From 1ce585db4c6ec4eeaf4015b04fe44e8a729af2f4 Mon Sep 17 00:00:00 2001 From: Deborah Olaboye Date: Wed, 1 Oct 2025 07:25:36 +0100 Subject: [PATCH 1/3] feat: deployed the smart contract --- bindings/.gitignore | 2 + bindings/README.md | 54 + bindings/package-lock.json | 762 +++++++++++++ bindings/package.json | 17 + bindings/src/index.ts | 2180 ++++++++++++++++++++++++++++++++++++ bindings/tsconfig.json | 98 ++ 6 files changed, 3113 insertions(+) create mode 100644 bindings/.gitignore create mode 100644 bindings/README.md create mode 100644 bindings/package-lock.json create mode 100644 bindings/package.json create mode 100644 bindings/src/index.ts create mode 100644 bindings/tsconfig.json diff --git a/bindings/.gitignore b/bindings/.gitignore new file mode 100644 index 0000000..72aae85 --- /dev/null +++ b/bindings/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +out/ diff --git a/bindings/README.md b/bindings/README.md new file mode 100644 index 0000000..98f0b05 --- /dev/null +++ b/bindings/README.md @@ -0,0 +1,54 @@ +# bindings JS + +JS library for interacting with [Soroban](https://soroban.stellar.org/) smart contract `bindings` via Soroban RPC. + +This library was automatically generated by Soroban CLI using a command similar to: + +```bash +soroban contract bindings ts \ + --rpc-url INSERT_RPC_URL_HERE \ + --network-passphrase "INSERT_NETWORK_PASSPHRASE_HERE" \ + --contract-id INSERT_CONTRACT_ID_HERE \ + --output-dir ./path/to/bindings +``` + +The network passphrase and contract ID are exported from [index.ts](./src/index.ts) in the `networks` constant. If you are the one who generated this library and you know that this contract is also deployed to other networks, feel free to update `networks` with other valid options. This will help your contract consumers use this library more easily. + +# To publish or not to publish + +This library is suitable for publishing to NPM. You can publish it to NPM using the `npm publish` command. + +But you don't need to publish this library to NPM to use it. You can add it to your project's `package.json` using a file path: + +```json +"dependencies": { + "bindings": "./path/to/this/folder" +} +``` + +However, we've actually encountered [frustration](https://github.com/stellar/soroban-example-dapp/pull/117#discussion_r1232873560) using local libraries with NPM in this way. Though it seems a bit messy, we suggest generating the library directly to your `node_modules` folder automatically after each install by using a `postinstall` script. We've had the least trouble with this approach. NPM will automatically remove what it sees as erroneous directories during the `install` step, and then regenerate them when it gets to your `postinstall` step, which will keep the library up-to-date with your contract. + +```json +"scripts": { + "postinstall": "soroban contract bindings ts --rpc-url INSERT_RPC_URL_HERE --network-passphrase \"INSERT_NETWORK_PASSPHRASE_HERE\" --id INSERT_CONTRACT_ID_HERE --name bindings" +} +``` + +Obviously you need to adjust the above command based on the actual command you used to generate the library. + +# Use it + +Now that you have your library up-to-date and added to your project, you can import it in a file and see inline documentation for all of its exported methods: + +```js +import { Contract, networks } from "bindings" + +const contract = new Contract({ + ...networks.futurenet, // for example; check which networks this library exports + rpcUrl: '...', // use your own, or find one for testing at https://soroban.stellar.org/docs/reference/rpc#public-rpc-providers +}) + +contract.| +``` + +As long as your editor is configured to show JavaScript/TypeScript documentation, you can pause your typing at that `|` to get a list of all exports and inline-documentation for each. It exports a separate [async](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function) function for each method in the smart contract, with documentation for each generated from the comments the contract's author included in the original source code. diff --git a/bindings/package-lock.json b/bindings/package-lock.json new file mode 100644 index 0000000..c4d8913 --- /dev/null +++ b/bindings/package-lock.json @@ -0,0 +1,762 @@ +{ + "name": "bindings", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "bindings", + "version": "0.0.0", + "dependencies": { + "@stellar/stellar-sdk": "^14.1.1", + "buffer": "6.0.3" + }, + "devDependencies": { + "typescript": "^5.6.2" + } + }, + "node_modules/@noble/curves": { + "version": "1.9.7", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz", + "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@stellar/js-xdr": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@stellar/js-xdr/-/js-xdr-3.1.2.tgz", + "integrity": "sha512-VVolPL5goVEIsvuGqDc5uiKxV03lzfWdvYg1KikvwheDmTBO68CKDji3bAZ/kppZrx5iTA8z3Ld5yuytcvhvOQ==", + "license": "Apache-2.0" + }, + "node_modules/@stellar/stellar-base": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/@stellar/stellar-base/-/stellar-base-14.0.1.tgz", + "integrity": "sha512-mI6Kjh9hGWDA1APawQTtCbR7702dNT/8Te1uuRFPqqdoAKBk3WpXOQI3ZSZO+5olW7BSHpmVG5KBPZpIpQxIvw==", + "license": "Apache-2.0", + "dependencies": { + "@noble/curves": "^1.9.6", + "@stellar/js-xdr": "^3.1.2", + "base32.js": "^0.1.0", + "bignumber.js": "^9.3.1", + "buffer": "^6.0.3", + "sha.js": "^2.4.12" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@stellar/stellar-sdk": { + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/@stellar/stellar-sdk/-/stellar-sdk-14.2.0.tgz", + "integrity": "sha512-7nh2ogzLRMhfkIC0fGjn1LHUzk3jqVw8tjAuTt5ADWfL9CSGBL18ILucE9igz2L/RU2AZgeAvhujAnW91Ut/oQ==", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@stellar/stellar-base": "^14.0.1", + "axios": "^1.12.2", + "bignumber.js": "^9.3.1", + "eventsource": "^2.0.2", + "feaxios": "^0.0.23", + "randombytes": "^2.1.0", + "toml": "^3.0.0", + "urijs": "^1.19.1" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/axios": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz", + "integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.4", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/base32.js": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/base32.js/-/base32.js-0.1.0.tgz", + "integrity": "sha512-n3TkB02ixgBOhTvANakDb4xaMXnYUVkNoRFJjQflcqMQhyEKxEHdj3E6N8t8sUQ0mjH/3/JxzlXuz3ul/J90pQ==", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/bignumber.js": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz", + "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/call-bind": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/eventsource": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-2.0.2.tgz", + "integrity": "sha512-IzUmBGPR3+oUG9dUeXynyNmf91/3zUSJg1lCktzKw47OXuhco54U3r9B7O4XX+Rb1Itm9OZ2b0RkTs10bICOxA==", + "license": "MIT", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/feaxios": { + "version": "0.0.23", + "resolved": "https://registry.npmjs.org/feaxios/-/feaxios-0.0.23.tgz", + "integrity": "sha512-eghR0A21fvbkcQBgZuMfQhrXxJzC0GNUGC9fXhBge33D+mFDTwl0aJ35zoQQn575BhyjQitRc5N4f+L4cP708g==", + "license": "MIT", + "dependencies": { + "is-retry-allowed": "^3.0.0" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/form-data": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-retry-allowed": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-3.0.0.tgz", + "integrity": "sha512-9xH0xvoggby+u0uGF7cZXdrutWiBiaFG8ZT4YFPXL8NzkyAwX3AKGLeFQLvzDpM430+nDFBZ1LHkie/8ocL06A==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "license": "MIT" + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/sha.js": { + "version": "2.4.12", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz", + "integrity": "sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==", + "license": "(MIT AND BSD-3-Clause)", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1", + "to-buffer": "^1.2.0" + }, + "bin": { + "sha.js": "bin.js" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/to-buffer": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.2.tgz", + "integrity": "sha512-db0E3UJjcFhpDhAF4tLo03oli3pwl3dbnzXOUIlRKrp+ldk/VUxzpWYZENsw2SZiuBjHAk7DfB0VU7NKdpb6sw==", + "license": "MIT", + "dependencies": { + "isarray": "^2.0.5", + "safe-buffer": "^5.2.1", + "typed-array-buffer": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/toml": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz", + "integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==", + "license": "MIT" + }, + "node_modules/typed-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/urijs": { + "version": "1.19.11", + "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.11.tgz", + "integrity": "sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ==", + "license": "MIT" + }, + "node_modules/which-typed-array": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", + "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + } + } +} diff --git a/bindings/package.json b/bindings/package.json new file mode 100644 index 0000000..2ad47c0 --- /dev/null +++ b/bindings/package.json @@ -0,0 +1,17 @@ +{ + "version": "0.0.0", + "name": "bindings", + "type": "module", + "exports": "./dist/index.js", + "typings": "dist/index.d.ts", + "scripts": { + "build": "tsc" + }, + "dependencies": { + "@stellar/stellar-sdk": "^14.1.1", + "buffer": "6.0.3" + }, + "devDependencies": { + "typescript": "^5.6.2" + } +} diff --git a/bindings/src/index.ts b/bindings/src/index.ts new file mode 100644 index 0000000..845723c --- /dev/null +++ b/bindings/src/index.ts @@ -0,0 +1,2180 @@ +import { Buffer } from "buffer"; +import { Address } from '@stellar/stellar-sdk'; +import { + AssembledTransaction, + Client as ContractClient, + ClientOptions as ContractClientOptions, + MethodOptions, + Result, + Spec as ContractSpec, +} from '@stellar/stellar-sdk/contract'; +import type { + u32, + i32, + u64, + i64, + u128, + i128, + u256, + i256, + Option, + Typepoint, + Duration, +} from '@stellar/stellar-sdk/contract'; +export * from '@stellar/stellar-sdk' +export * as contract from '@stellar/stellar-sdk/contract' +export * as rpc from '@stellar/stellar-sdk/rpc' + +if (typeof window !== 'undefined') { + //@ts-ignore Buffer exists + window.Buffer = window.Buffer || Buffer; +} + + + + +/** + * Status of the escrow operation + */ +export type EscrowStatus = {tag: "Active", values: void} | {tag: "Disputed", values: void} | {tag: "Released", values: void} | {tag: "Refunded", values: void} | {tag: "AutoReleased", values: void} | {tag: "DisputeResolvedForRecipient", values: void} | {tag: "DisputeResolvedForSender", values: void}; + + +/** + * Dispute information + */ +export interface DisputeInfo { + /** + * Dispute period duration in seconds + */ +dispute_period: u64; + /** + * Timestamp when dispute was initiated + */ +initiated_at: u64; + /** + * Who initiated the dispute + */ +initiated_by: string; + /** + * Reason for the dispute + */ +reason: string; +} + + +/** + * Configuration for the escrow + */ +export interface EscrowConfig { + /** + * Amount of tokens in escrow + */ +amount: i128; + /** + * Timestamp when the escrow was created + */ +created_at: u64; + /** + * Dispute period in seconds (default dispute window) + */ +dispute_period: u64; + /** + * Has dispute flag + */ +has_dispute: boolean; + /** + * The escrow identifier + */ +id: string; + /** + * Address of the user receiving the funds + */ +recipient: string; + /** + * Address of the user sending the funds + */ +sender: string; + /** + * Current status of the escrow + */ +status: EscrowStatus; + /** + * Timeout period in seconds after which funds auto-release + */ +timeout_duration: u64; + /** + * Token being held in escrow + */ +token: string; +} + + +/** + * Public information about an escrow + */ +export interface EscrowInfo { + amount: i128; + created_at: u64; + dispute_period: u64; + has_dispute: boolean; + id: string; + recipient: string; + sender: string; + status: EscrowStatus; + timeout_at: u64; + token: string; +} + + +export interface EscrowCreatedData { + amount: i128; + created_at: u64; + escrow_id: string; + recipient: string; + sender: string; + timeout_at: u64; + token: string; +} + + +export interface EscrowReleasedData { + amount: i128; + escrow_id: string; + recipient: string; + released_at: u64; + released_by: string; + token: string; +} + + +export interface EscrowRefundedData { + amount: i128; + escrow_id: string; + refunded_at: u64; + refunded_by: string; + sender: string; + token: string; +} + + +export interface EscrowDisputeInitiatedData { + dispute_period: u64; + escrow_id: string; + initiated_at: u64; + initiated_by: string; + reason: string; +} + + +export interface EscrowDisputeResolvedData { + escrow_id: string; + resolved_at: u64; + resolved_for: string; + resolved_for_recipient: boolean; +} + + +export interface SwapOfferCreatedData { + created_at: u64; + creator: string; + exchange_rate: i128; + expires_at: u64; + offer_amount: i128; + offer_id: u64; + offer_token: string; + request_amount: i128; + request_token: string; +} + + +export interface SwapOfferAcceptedData { + accepted_at: u64; + acceptor: string; + creator: string; + fee_amount: i128; + fee_token: string; + offer_amount: i128; + offer_id: u64; + offer_token: string; + request_amount: i128; + request_token: string; +} + + +export interface TokenTransferredData { + amount: i128; + from: string; + from_balance: i128; + to: string; + to_balance: i128; + token: string; + transferred_at: u64; +} + + +export interface TokenMintedData { + amount: i128; + minted_at: u64; + minter: string; + to: string; + token: string; +} + + +export interface MultisigTransactionProposedData { + current_signatures: u32; + nonce: u32; + operation_hash: Buffer; + proposed_at: u64; + proposer: string; + threshold: u32; +} + + +export interface MultisigTransactionExecutedData { + executed_at: u64; + nonce: u32; + operation_hash: Buffer; + signers: Array; +} + + +export interface MultisigConfigUpdatedData { + new_signers: Array; + new_threshold: u32; + old_signers: Array; + old_threshold: u32; + updated_at: u64; +} + + +export interface WalletToppedUpData { + amount: i128; + new_balance: i128; + source: string; + token: string; + topped_up_at: u64; + wallet: string; +} + + +export interface ContractErrorData { + context_data: Buffer; + contract_address: string; + error_message: Buffer; + error_type: string; + occurred_at: u64; +} + +export type DeFiEvent = {tag: "EscrowCreated", values: readonly [EscrowCreatedData]} | {tag: "EscrowReleased", values: readonly [EscrowReleasedData]} | {tag: "EscrowRefunded", values: readonly [EscrowRefundedData]} | {tag: "EscrowDisputeInitiated", values: readonly [EscrowDisputeInitiatedData]} | {tag: "EscrowDisputeResolved", values: readonly [EscrowDisputeResolvedData]} | {tag: "SwapOfferCreated", values: readonly [SwapOfferCreatedData]} | {tag: "SwapOfferAccepted", values: readonly [SwapOfferAcceptedData]} | {tag: "TokenTransferred", values: readonly [TokenTransferredData]} | {tag: "TokenMinted", values: readonly [TokenMintedData]} | {tag: "MultisigTransactionProposed", values: readonly [MultisigTransactionProposedData]} | {tag: "MultisigTransactionExecuted", values: readonly [MultisigTransactionExecutedData]} | {tag: "MultisigConfigUpdated", values: readonly [MultisigConfigUpdatedData]} | {tag: "WalletToppedUp", values: readonly [WalletToppedUpData]} | {tag: "ContractError", values: readonly [ContractErrorData]}; + +/** + * Supported currencies for conversion + */ +export type Currency = {tag: "NGN", values: void} | {tag: "USD", values: void} | {tag: "EUR", values: void} | {tag: "GBP", values: void} | {tag: "BTC", values: void} | {tag: "ETH", values: void}; + + +/** + * Exchange rate information + */ +export interface ExchangeRate { + /** + * Base currency + */ +from_currency: Currency; + /** + * Whether the rate is locked for transactions + */ +is_locked: boolean; + /** + * Exchange rate (scaled by 10^8 for precision) + */ +rate: i128; + /** + * Target currency + */ +to_currency: Currency; + /** + * Timestamp when rate was set + */ +updated_at: u64; + /** + * Rate validity duration in seconds + */ +validity_duration: u64; +} + + +/** + * User balance information + */ +export interface UserBalance { + /** + * Currency balances map + */ +balances: Map; + /** + * Last updated timestamp + */ +updated_at: u64; + /** + * User's address + */ +user: string; +} + + +/** + * Conversion transaction details + */ +export interface ConversionTx { + /** + * Amount to convert (in source currency) + */ +amount: i128; + /** + * Amount received (after fees) + */ +amount_received: i128; + /** + * Source currency + */ +from_currency: Currency; + /** + * Platform fee charged + */ +platform_fee: i128; + /** + * Exchange rate used + */ +rate: i128; + /** + * Transaction status + */ +status: ConversionStatus; + /** + * Timestamp of conversion + */ +timestamp: u64; + /** + * Target currency + */ +to_currency: Currency; + /** + * Transaction ID + */ +tx_id: string; + /** + * User performing conversion + */ +user: string; +} + +/** + * Status of conversion transaction + */ +export type ConversionStatus = {tag: "Pending", values: void} | {tag: "Completed", values: void} | {tag: "Failed", values: void} | {tag: "Cancelled", values: void}; + + +/** + * Platform configuration + */ +export interface PlatformConfig { + /** + * Platform admin + */ +admin: string; + /** + * Platform fee in basis points (e.g., 50 = 0.5%) + */ +fee_bps: u32; + /** + * Fee collector address + */ +fee_collector: string; + /** + * Maximum conversion amount per transaction + */ +max_conversion_amount: i128; + /** + * Minimum conversion amount + */ +min_conversion_amount: i128; + /** + * Rate lock duration in seconds + */ +rate_lock_duration: u64; +} + +/** + * Events emitted by the conversion contract + */ +export type ConversionEvent = {tag: "ConversionCompleted", values: readonly [string, string, Currency, Currency, i128, i128, i128]} | {tag: "RateUpdated", values: readonly [Currency, Currency, i128, u64]} | {tag: "RateLocked", values: readonly [Currency, Currency, i128, u64]} | {tag: "FeeCollected", values: readonly [Currency, i128, string]}; + +/** + * Storage keys for the contract + */ +export type DataKey = {tag: "Config", values: void} | {tag: "Rate", values: readonly [Currency, Currency]} | {tag: "Balance", values: readonly [string]} | {tag: "Transaction", values: readonly [string]} | {tag: "TxCounter", values: void} | {tag: "SupportedCurrencies", values: void}; + + +/** + * Liquidity pool for a specific currency + */ +export interface LiquidityPool { + /** + * Available liquidity for conversions + */ +available_liquidity: i128; + /** + * Pool creation timestamp + */ +created_at: u64; + /** + * Currency of the pool + */ +currency: Currency; + /** + * Last activity timestamp + */ +last_activity_at: u64; + /** + * Minimum liquidity threshold + */ +min_liquidity_threshold: i128; + /** + * Number of liquidity providers + */ +provider_count: u32; + /** + * Reserved liquidity (locked in active conversions) + */ +reserved_liquidity: i128; + /** + * Total liquidity in the pool + */ +total_liquidity: i128; + /** + * Pool utilization rate (basis points) + */ +utilization_rate_bps: u32; +} + + +/** + * Individual liquidity provider position + */ +export interface LiquidityPosition { + /** + * Accumulated rewards from conversions + */ +accumulated_rewards: i128; + /** + * Timestamp when liquidity was added + */ +added_at: u64; + /** + * Currency of the position + */ +currency: Currency; + /** + * Last time position was modified + */ +last_modified_at: u64; + /** + * Amount of liquidity provided + */ +liquidity_amount: i128; + /** + * Lock period end timestamp (0 if not locked) + */ +lock_until: u64; + /** + * Share of the pool (basis points) + */ +pool_share_bps: u32; + /** + * Provider's address + */ +provider: string; +} + + +/** + * Pool manager configuration + */ +export interface PoolManagerConfig { + /** + * Administrator address + */ +admin: string; + /** + * Default liquidity lock period (seconds) + */ +default_lock_period: u64; + /** + * Emergency pause flag + */ +is_paused: boolean; + /** + * Maximum liquidity amount per provider + */ +max_liquidity_amount: i128; + /** + * Minimum liquidity amount per provider + */ +min_liquidity_amount: i128; + /** + * Reward rate for liquidity providers (basis points) + */ +provider_reward_rate_bps: u32; + /** + * Pool utilization threshold for warnings (basis points) + */ +utilization_warning_bps: u32; +} + +/** + * Pool manager events + */ +export type PoolManagerEvent = {tag: "LiquidityAdded", values: readonly [string, Currency, i128, u32]} | {tag: "LiquidityRemoved", values: readonly [string, Currency, i128, u32]} | {tag: "PoolBalanceUpdated", values: readonly [Currency, i128, i128, i128]} | {tag: "ProviderRewarded", values: readonly [string, Currency, i128]} | {tag: "PoolUtilizationWarning", values: readonly [Currency, u32]} | {tag: "EmergencyPauseActivated", values: readonly [string]} | {tag: "EmergencyPauseDeactivated", values: readonly [string]}; + +/** + * Storage keys for pool manager + */ +export type PoolDataKey = {tag: "PoolConfig", values: void} | {tag: "Pool", values: readonly [Currency]} | {tag: "Position", values: readonly [string, Currency]} | {tag: "PositionCounter", values: void} | {tag: "ActiveCurrencies", values: void} | {tag: "UtilizationHistory", values: readonly [Currency, u64]} | {tag: "ProviderRewards", values: readonly [string]} | {tag: "CurrencyProviders", values: readonly [Currency]}; + +export type AppError = {tag: "InvalidAmount", values: void} | {tag: "InvalidAddress", values: void} | {tag: "InvalidTimestamp", values: void} | {tag: "InsufficientBalance", values: void} | {tag: "UnsupportedCurrency", values: void} | {tag: "RateExpired", values: void} | {tag: "ConversionLimitExceeded", values: void} | {tag: "Unauthorized", values: void}; + + +export interface TokenConfig { + admin: string; + decimals: u32; + name: string; + symbol: string; +} + + +export interface Balance { + amount: i128; +} + + +export interface MultiSigConfig { + nonce: u32; + signers: Array; + threshold: u32; +} + + +export interface Transaction { + nonce: u32; + operation: Buffer; + timestamp: u64; +} + +export const RateLockError = { + 1: {message:"NoRateLocked"}, + 2: {message:"RateExpired"} +} + +export const ContractError = { + 1: {message:"InvalidNonce"} +} + +export type Event = {tag: "FeeCollected", values: readonly [string, i128]} | {tag: "OfferCreated", values: readonly [u64, string, i128]} | {tag: "OfferAccepted", values: readonly [u64, string]} | {tag: "OfferCancelled", values: readonly [u64]}; + + +/** + * Represents a swap offer in the contract's storage + */ +export interface SwapOffer { + creator: string; + expires_at: u64; + offer_amount: i128; + offer_token: string; + request_amount: i128; + request_token: string; +} + + +export interface SwapConfig { + admin: string; + fee_bps: u32; + fee_collector: string; +} + +export type DataKey = {tag: "Config", values: void} | {tag: "TotalDistributed", values: readonly [string]}; + + +export interface FeeDistributionConfig { + admin: string; + reward_pool_address: string; + reward_pool_bps: u32; + treasury_address: string; + treasury_bps: u32; +} + + +export interface TokenDistributionTotals { + to_reward_pool: i128; + to_treasury: i128; +} + + +export interface FeeDistributedEvent { + fee_token: string; + reward_pool_amount: i128; + reward_pool_dest: string; + total_collected_fee: i128; + treasury_amount: i128; + treasury_dest: string; +} + +export interface Client { + /** + * Construct and simulate a create transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Create a new escrow + */ + create: ({sender, recipient, token, amount, timeout_duration, dispute_period}: {sender: string, recipient: string, token: string, amount: i128, timeout_duration: u64, dispute_period: u64}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a release transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Release funds to the recipient (can only be called by sender) + */ + release: ({escrow_id}: {escrow_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a refund transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Refund the tokens back to the sender (can be called by both sender and recipient) + */ + refund: ({escrow_id}: {escrow_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a check_timeout transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Check if the escrow has timed out and release funds if necessary + */ + check_timeout: ({escrow_id}: {escrow_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_escrow transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get information about an escrow + */ + get_escrow: ({escrow_id}: {escrow_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_all_escrows transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get all active escrows + */ + get_all_escrows: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a initiate_dispute transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Initiate a dispute (can be called by sender or recipient) + */ + initiate_dispute: ({escrow_id, reason}: {escrow_id: string, reason: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a resolve_dispute_for_recipient transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Resolve dispute in favor of recipient (admin function or automated) + */ + resolve_dispute_for_recipient: ({escrow_id}: {escrow_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a resolve_dispute_for_sender transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Resolve dispute in favor of sender (admin function or automated) + */ + resolve_dispute_for_sender: ({escrow_id}: {escrow_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a check_dispute_timeout transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Check if dispute has timed out and auto-resolve (default to recipient) + */ + check_dispute_timeout: ({escrow_id}: {escrow_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_dispute_info transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get dispute information for an escrow + */ + get_dispute_info: ({escrow_id}: {escrow_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a can_dispute transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Check if an escrow can be disputed (is active and no existing dispute) + */ + can_dispute: ({escrow_id}: {escrow_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_escrow_count transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get escrow count for statistics + */ + get_escrow_count: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a escrow_exists transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Check if escrow exists + */ + escrow_exists: ({escrow_id}: {escrow_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_escrows_by_status transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get escrows by status for filtering + */ + get_escrows_by_status: ({status}: {status: EscrowStatus}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a get_escrows_by_participant transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get escrows by participant (sender or recipient) + */ + get_escrows_by_participant: ({participant}: {participant: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a update_dispute_period transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Update dispute period for an active escrow (only by sender before dispute) + */ + update_dispute_period: ({escrow_id, new_dispute_period}: {escrow_id: string, new_dispute_period: u64}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a initialize transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Initialize contract with admin (should be called once during deployment) + */ + initialize: ({admin}: {admin: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a set_dispute_fee transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Set dispute fee (admin only) + */ + set_dispute_fee: ({fee}: {fee: i128}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_dispute_fee transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get current dispute fee + */ + get_dispute_fee: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_admin transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get contract admin + */ + get_admin: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a transfer_admin transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Transfer admin rights (admin only) + */ + transfer_admin: ({new_admin}: {new_admin: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a set_paused transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Emergency pause/unpause functionality (admin only) + */ + set_paused: ({paused}: {paused: boolean}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a is_paused transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Check if contract is paused + */ + is_paused: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a admin_resolve_dispute transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Admin emergency resolution (admin only, for extreme cases) + */ + admin_resolve_dispute: ({escrow_id, resolve_for_recipient}: {escrow_id: string, resolve_for_recipient: boolean}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a initialize_conversion transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Initialize the conversion contract + */ + initialize_conversion: ({admin, fee_bps, fee_collector, min_amount, max_amount}: {admin: string, fee_bps: u32, fee_collector: string, min_amount: i128, max_amount: i128}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a update_rate transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Update exchange rate for a currency pair + */ + update_rate: ({from_currency, to_currency, rate, validity_duration}: {from_currency: Currency, to_currency: Currency, rate: i128, validity_duration: u64}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a conversion_rate transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Lock exchange rate for a transaction + */ + conversion_rate: ({from_currency, to_currency}: {from_currency: Currency, to_currency: Currency}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a convert_currency transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Perform currency conversion + */ + convert_currency: ({user, from_currency, to_currency, amount}: {user: string, from_currency: Currency, to_currency: Currency, amount: i128}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_user_balance transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get user balance for all currencies + */ + get_user_balance: ({user}: {user: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_transaction transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get conversion transaction details + */ + get_transaction: ({tx_id}: {tx_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_rate transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get current exchange rate + */ + get_rate: ({from_currency, to_currency}: {from_currency: Currency, to_currency: Currency}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_conversion_config transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get platform configuration + */ + get_conversion_config: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a deposit transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + deposit: ({user, currency, amount}: {user: string, currency: Currency, amount: i128}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a initialize_pool_manager transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Initialize the pool manager + */ + initialize_pool_manager: ({admin, min_liquidity, max_liquidity, lock_period, reward_rate_bps}: {admin: string, min_liquidity: i128, max_liquidity: i128, lock_period: u64, reward_rate_bps: u32}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a add_liquidity transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Add liquidity to a currency pool + */ + add_liquidity: ({provider, currency, amount, lock_period}: {provider: string, currency: Currency, amount: i128, lock_period: Option}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a remove_liquidity transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Remove liquidity from a currency pool + */ + remove_liquidity: ({provider, currency, amount}: {provider: string, currency: Currency, amount: i128}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a update_pool_on_conversion transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Update pool balance during conversion operations + */ + update_pool_on_conversion: ({from_currency, to_currency, from_amount, to_amount}: {from_currency: Currency, to_currency: Currency, from_amount: i128, to_amount: i128}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a distribute_rewards transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Distribute rewards to liquidity providers + */ + distribute_rewards: ({currency, total_fee_amount}: {currency: Currency, total_fee_amount: i128}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a get_pool transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get liquidity pool information + */ + get_pool: ({currency}: {currency: Currency}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_position transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get liquidity position for a provider + */ + get_position: ({provider, currency}: {provider: string, currency: Currency}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_pool_config transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get pool manager configuration + */ + get_pool_config: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_active_currencies transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get all active currencies with pools + */ + get_active_currencies: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a emergency_pause transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Emergency pause functionality + */ + emergency_pause: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a resume_operations transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Resume operations after emergency pause + */ + resume_operations: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a init transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + init: ({backend}: {backend: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a mint_token transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + mint_token: ({recipient, amount, token}: {recipient: string, amount: i128, token: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a initialize_token transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + initialize_token: ({admin, name, symbol, decimals}: {admin: string, name: string, symbol: string, decimals: u32}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a mint transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + mint: ({minter, to, amount}: {minter: string, to: string, amount: i128}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a transfer transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + transfer: ({from, to, amount}: {from: string, to: string, amount: i128}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a balance transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + balance: ({of}: {of: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_token_config transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + get_token_config: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a initialize_multisig transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + initialize_multisig: ({signers, threshold}: {signers: Array, threshold: u32}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a propose_transaction transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + propose_transaction: ({operation, signatures, proposer}: {operation: Buffer, signatures: Array, proposer: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_multisig_config transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + get_multisig_config: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a update_multisig_config transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + update_multisig_config: ({new_signers, new_threshold, proposer}: {new_signers: Array, new_threshold: u32, proposer: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a lock_rate transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + lock_rate: ({user, rate, duration_seconds}: {user: string, rate: i128, duration_seconds: u64}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a validate_conversion transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + validate_conversion: ({user}: {user: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a get_nonce transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + get_nonce: ({user}: {user: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a check_and_update_nonce transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + check_and_update_nonce: ({user, incoming}: {user: string, incoming: u64}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a initialize_fees transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + initialize_fees: ({admin, treasury_address, reward_pool_address, treasury_bps, reward_pool_bps}: {admin: string, treasury_address: string, reward_pool_address: string, treasury_bps: u32, reward_pool_bps: u32}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a update_fees_config transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + update_fees_config: ({treasury_address, reward_pool_address, treasury_bps, reward_pool_bps}: {treasury_address: Option, reward_pool_address: Option, treasury_bps: Option, reward_pool_bps: Option}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a get_fees_config transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + get_fees_config: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a distribute_fees transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Distributes collected fees to treasury and reward pools. + * This function should be called by the contract that collected the fees. + * `fee_collector_contract` is the address holding the `total_fee_amount`. + */ + distribute_fees: ({fee_token, total_fee_amount, fee_collector_contract}: {fee_token: string, total_fee_amount: i128, fee_collector_contract: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a get_total_distributed transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + get_total_distributed: ({token}: {token: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + +} +export class Client extends ContractClient { + static async deploy( + /** Options for initializing a Client as well as for calling a method, with extras specific to deploying. */ + options: MethodOptions & + Omit & { + /** The hash of the Wasm blob, which must already be installed on-chain. */ + wasmHash: Buffer | string; + /** Salt used to generate the contract's ID. Passed through to {@link Operation.createCustomContract}. Default: random. */ + salt?: Buffer | Uint8Array; + /** The format used to decode `wasmHash`, if it's provided as a string. */ + format?: "hex" | "base64"; + } + ): Promise> { + return ContractClient.deploy(null, options) + } + constructor(public readonly options: ContractClientOptions) { + super( + new ContractSpec([ "AAAAAgAAAB5TdGF0dXMgb2YgdGhlIGVzY3JvdyBvcGVyYXRpb24AAAAAAAAAAAAMRXNjcm93U3RhdHVzAAAABwAAAAAAAAAlRXNjcm93IGlzIGFjdGl2ZSBhbmQgZnVuZHMgYXJlIGxvY2tlZAAAAAAAAAZBY3RpdmUAAAAAAAAAAAAcQSBkaXNwdXRlIGhhcyBiZWVuIGluaXRpYXRlZAAAAAhEaXNwdXRlZAAAAAAAAAApRnVuZHMgaGF2ZSBiZWVuIHJlbGVhc2VkIHRvIHRoZSByZWNpcGllbnQAAAAAAAAIUmVsZWFzZWQAAAAAAAAAJkZ1bmRzIGhhdmUgYmVlbiByZXR1cm5lZCB0byB0aGUgc2VuZGVyAAAAAAAIUmVmdW5kZWQAAAAAAAAAL0Z1bmRzIHdlcmUgYXV0b21hdGljYWxseSByZWxlYXNlZCBhZnRlciB0aW1lb3V0AAAAAAxBdXRvUmVsZWFzZWQAAAAAAAAAKkRpc3B1dGUgd2FzIHJlc29sdmVkIGluIGZhdm9yIG9mIHJlY2lwaWVudAAAAAAAG0Rpc3B1dGVSZXNvbHZlZEZvclJlY2lwaWVudAAAAAAAAAAAJ0Rpc3B1dGUgd2FzIHJlc29sdmVkIGluIGZhdm9yIG9mIHNlbmRlcgAAAAAYRGlzcHV0ZVJlc29sdmVkRm9yU2VuZGVy", + "AAAAAQAAABNEaXNwdXRlIGluZm9ybWF0aW9uAAAAAAAAAAALRGlzcHV0ZUluZm8AAAAABAAAACJEaXNwdXRlIHBlcmlvZCBkdXJhdGlvbiBpbiBzZWNvbmRzAAAAAAAOZGlzcHV0ZV9wZXJpb2QAAAAA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hlIGNvbnRyYWN0IHRoYXQgY29sbGVjdGVkIHRoZSBmZWVzLgpgZmVlX2NvbGxlY3Rvcl9jb250cmFjdGAgaXMgdGhlIGFkZHJlc3MgaG9sZGluZyB0aGUgYHRvdGFsX2ZlZV9hbW91bnRgLgAAAA9kaXN0cmlidXRlX2ZlZXMAAAAAAwAAAAAAAAAJZmVlX3Rva2VuAAAAAAAAEwAAAAAAAAAQdG90YWxfZmVlX2Ftb3VudAAAAAsAAAAAAAAAFmZlZV9jb2xsZWN0b3JfY29udHJhY3QAAAAAABMAAAABAAAD6QAAA+0AAAAAAAAAAw==", + "AAAAAAAAAAAAAAAVZ2V0X3RvdGFsX2Rpc3RyaWJ1dGVkAAAAAAAAAQAAAAAAAAAFdG9rZW4AAAAAAAATAAAAAQAAB9AAAAAXVG9rZW5EaXN0cmlidXRpb25Ub3RhbHMA" ]), + options + ) + } + public readonly fromJSON = { + create: this.txFromJSON, + release: this.txFromJSON, + refund: this.txFromJSON, + check_timeout: this.txFromJSON, + get_escrow: this.txFromJSON, + get_all_escrows: this.txFromJSON>, + initiate_dispute: this.txFromJSON, + resolve_dispute_for_recipient: this.txFromJSON, + resolve_dispute_for_sender: this.txFromJSON, + check_dispute_timeout: this.txFromJSON, + get_dispute_info: this.txFromJSON>, + can_dispute: this.txFromJSON, + get_escrow_count: this.txFromJSON, + escrow_exists: this.txFromJSON, + get_escrows_by_status: this.txFromJSON>, + get_escrows_by_participant: this.txFromJSON>, + update_dispute_period: this.txFromJSON, + initialize: this.txFromJSON, + set_dispute_fee: this.txFromJSON, + get_dispute_fee: this.txFromJSON, + get_admin: this.txFromJSON, + transfer_admin: this.txFromJSON, + set_paused: this.txFromJSON, + is_paused: this.txFromJSON, + admin_resolve_dispute: this.txFromJSON, + initialize_conversion: this.txFromJSON, + update_rate: this.txFromJSON, + conversion_rate: this.txFromJSON, + convert_currency: this.txFromJSON, + get_user_balance: this.txFromJSON, + get_transaction: this.txFromJSON, + get_rate: this.txFromJSON, + get_conversion_config: this.txFromJSON, + deposit: this.txFromJSON, + initialize_pool_manager: this.txFromJSON, + add_liquidity: this.txFromJSON, + remove_liquidity: this.txFromJSON, + update_pool_on_conversion: this.txFromJSON, + distribute_rewards: this.txFromJSON>, + get_pool: this.txFromJSON, + get_position: this.txFromJSON, + get_pool_config: this.txFromJSON, + get_active_currencies: this.txFromJSON>, + emergency_pause: this.txFromJSON, + resume_operations: this.txFromJSON, + init: this.txFromJSON, + mint_token: this.txFromJSON, + initialize_token: this.txFromJSON, + mint: this.txFromJSON, + transfer: this.txFromJSON, + balance: this.txFromJSON, + get_token_config: this.txFromJSON, + initialize_multisig: this.txFromJSON, + propose_transaction: this.txFromJSON, + get_multisig_config: this.txFromJSON, + update_multisig_config: this.txFromJSON, + lock_rate: this.txFromJSON, + validate_conversion: this.txFromJSON>, + get_nonce: this.txFromJSON, + check_and_update_nonce: this.txFromJSON>, + initialize_fees: this.txFromJSON>, + update_fees_config: this.txFromJSON>, + get_fees_config: this.txFromJSON>, + distribute_fees: this.txFromJSON>, + get_total_distributed: this.txFromJSON + } +} \ No newline at end of file diff --git a/bindings/tsconfig.json b/bindings/tsconfig.json new file mode 100644 index 0000000..acac142 --- /dev/null +++ b/bindings/tsconfig.json @@ -0,0 +1,98 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + /* Language and Environment */ + "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + /* Modules */ + "module": "NodeNext", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + "moduleResolution": "nodenext", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + "outDir": "./dist", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + // "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + // "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + /* Type Checking */ + // "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "include": [ + "src/*" + ] +} \ No newline at end of file From e2c65bf3ccd899b7973d892b234f9c9dfc9592b8 Mon Sep 17 00:00:00 2001 From: Deborah Olaboye Date: Wed, 1 Oct 2025 07:54:28 +0100 Subject: [PATCH 2/3] feat: deployed the smart contract --- bindings/dist/.gitignore | 2 + bindings/dist/README.md | 54 + bindings/dist/package.json | 17 + bindings/dist/src/index.ts | 2180 +++++++++++++++++++++++++++++++++++ bindings/dist/tsconfig.json | 98 ++ 5 files changed, 2351 insertions(+) create mode 100644 bindings/dist/.gitignore create mode 100644 bindings/dist/README.md create mode 100644 bindings/dist/package.json create mode 100644 bindings/dist/src/index.ts create mode 100644 bindings/dist/tsconfig.json diff --git a/bindings/dist/.gitignore b/bindings/dist/.gitignore new file mode 100644 index 0000000..72aae85 --- /dev/null +++ b/bindings/dist/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +out/ diff --git a/bindings/dist/README.md b/bindings/dist/README.md new file mode 100644 index 0000000..bb345b0 --- /dev/null +++ b/bindings/dist/README.md @@ -0,0 +1,54 @@ +# dist JS + +JS library for interacting with [Soroban](https://soroban.stellar.org/) smart contract `dist` via Soroban RPC. + +This library was automatically generated by Soroban CLI using a command similar to: + +```bash +soroban contract bindings ts \ + --rpc-url INSERT_RPC_URL_HERE \ + --network-passphrase "INSERT_NETWORK_PASSPHRASE_HERE" \ + --contract-id INSERT_CONTRACT_ID_HERE \ + --output-dir ./path/to/dist +``` + +The network passphrase and contract ID are exported from [index.ts](./src/index.ts) in the `networks` constant. If you are the one who generated this library and you know that this contract is also deployed to other networks, feel free to update `networks` with other valid options. This will help your contract consumers use this library more easily. + +# To publish or not to publish + +This library is suitable for publishing to NPM. You can publish it to NPM using the `npm publish` command. + +But you don't need to publish this library to NPM to use it. You can add it to your project's `package.json` using a file path: + +```json +"dependencies": { + "dist": "./path/to/this/folder" +} +``` + +However, we've actually encountered [frustration](https://github.com/stellar/soroban-example-dapp/pull/117#discussion_r1232873560) using local libraries with NPM in this way. Though it seems a bit messy, we suggest generating the library directly to your `node_modules` folder automatically after each install by using a `postinstall` script. We've had the least trouble with this approach. NPM will automatically remove what it sees as erroneous directories during the `install` step, and then regenerate them when it gets to your `postinstall` step, which will keep the library up-to-date with your contract. + +```json +"scripts": { + "postinstall": "soroban contract bindings ts --rpc-url INSERT_RPC_URL_HERE --network-passphrase \"INSERT_NETWORK_PASSPHRASE_HERE\" --id INSERT_CONTRACT_ID_HERE --name dist" +} +``` + +Obviously you need to adjust the above command based on the actual command you used to generate the library. + +# Use it + +Now that you have your library up-to-date and added to your project, you can import it in a file and see inline documentation for all of its exported methods: + +```js +import { Contract, networks } from "dist" + +const contract = new Contract({ + ...networks.futurenet, // for example; check which networks this library exports + rpcUrl: '...', // use your own, or find one for testing at https://soroban.stellar.org/docs/reference/rpc#public-rpc-providers +}) + +contract.| +``` + +As long as your editor is configured to show JavaScript/TypeScript documentation, you can pause your typing at that `|` to get a list of all exports and inline-documentation for each. It exports a separate [async](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function) function for each method in the smart contract, with documentation for each generated from the comments the contract's author included in the original source code. diff --git a/bindings/dist/package.json b/bindings/dist/package.json new file mode 100644 index 0000000..3674340 --- /dev/null +++ b/bindings/dist/package.json @@ -0,0 +1,17 @@ +{ + "version": "0.0.0", + "name": "dist", + "type": "module", + "exports": "./dist/index.js", + "typings": "dist/index.d.ts", + "scripts": { + "build": "tsc" + }, + "dependencies": { + "@stellar/stellar-sdk": "^14.1.1", + "buffer": "6.0.3" + }, + "devDependencies": { + "typescript": "^5.6.2" + } +} diff --git a/bindings/dist/src/index.ts b/bindings/dist/src/index.ts new file mode 100644 index 0000000..845723c --- /dev/null +++ b/bindings/dist/src/index.ts @@ -0,0 +1,2180 @@ +import { Buffer } from "buffer"; +import { Address } from '@stellar/stellar-sdk'; +import { + AssembledTransaction, + Client as ContractClient, + ClientOptions as ContractClientOptions, + MethodOptions, + Result, + Spec as ContractSpec, +} from '@stellar/stellar-sdk/contract'; +import type { + u32, + i32, + u64, + i64, + u128, + i128, + u256, + i256, + Option, + Typepoint, + Duration, +} from '@stellar/stellar-sdk/contract'; +export * from '@stellar/stellar-sdk' +export * as contract from '@stellar/stellar-sdk/contract' +export * as rpc from '@stellar/stellar-sdk/rpc' + +if (typeof window !== 'undefined') { + //@ts-ignore Buffer exists + window.Buffer = window.Buffer || Buffer; +} + + + + +/** + * Status of the escrow operation + */ +export type EscrowStatus = {tag: "Active", values: void} | {tag: "Disputed", values: void} | {tag: "Released", values: void} | {tag: "Refunded", values: void} | {tag: "AutoReleased", values: void} | {tag: "DisputeResolvedForRecipient", values: void} | {tag: "DisputeResolvedForSender", values: void}; + + +/** + * Dispute information + */ +export interface DisputeInfo { + /** + * Dispute period duration in seconds + */ +dispute_period: u64; + /** + * Timestamp when dispute was initiated + */ +initiated_at: u64; + /** + * Who initiated the dispute + */ +initiated_by: string; + /** + * Reason for the dispute + */ +reason: string; +} + + +/** + * Configuration for the escrow + */ +export interface EscrowConfig { + /** + * Amount of tokens in escrow + */ +amount: i128; + /** + * Timestamp when the escrow was created + */ +created_at: u64; + /** + * Dispute period in seconds (default dispute window) + */ +dispute_period: u64; + /** + * Has dispute flag + */ +has_dispute: boolean; + /** + * The escrow identifier + */ +id: string; + /** + * Address of the user receiving the funds + */ +recipient: string; + /** + * Address of the user sending the funds + */ +sender: string; + /** + * Current status of the escrow + */ +status: EscrowStatus; + /** + * Timeout period in seconds after which funds auto-release + */ +timeout_duration: u64; + /** + * Token being held in escrow + */ +token: string; +} + + +/** + * Public information about an escrow + */ +export interface EscrowInfo { + amount: i128; + created_at: u64; + dispute_period: u64; + has_dispute: boolean; + id: string; + recipient: string; + sender: string; + status: EscrowStatus; + timeout_at: u64; + token: string; +} + + +export interface EscrowCreatedData { + amount: i128; + created_at: u64; + escrow_id: string; + recipient: string; + sender: string; + timeout_at: u64; + token: string; +} + + +export interface EscrowReleasedData { + amount: i128; + escrow_id: string; + recipient: string; + released_at: u64; + released_by: string; + token: string; +} + + +export interface EscrowRefundedData { + amount: i128; + escrow_id: string; + refunded_at: u64; + refunded_by: string; + sender: string; + token: string; +} + + +export interface EscrowDisputeInitiatedData { + dispute_period: u64; + escrow_id: string; + initiated_at: u64; + initiated_by: string; + reason: string; +} + + +export interface EscrowDisputeResolvedData { + escrow_id: string; + resolved_at: u64; + resolved_for: string; + resolved_for_recipient: boolean; +} + + +export interface SwapOfferCreatedData { + created_at: u64; + creator: string; + exchange_rate: i128; + expires_at: u64; + offer_amount: i128; + offer_id: u64; + offer_token: string; + request_amount: i128; + request_token: string; +} + + +export interface SwapOfferAcceptedData { + accepted_at: u64; + acceptor: string; + creator: string; + fee_amount: i128; + fee_token: string; + offer_amount: i128; + offer_id: u64; + offer_token: string; + request_amount: i128; + request_token: string; +} + + +export interface TokenTransferredData { + amount: i128; + from: string; + from_balance: i128; + to: string; + to_balance: i128; + token: string; + transferred_at: u64; +} + + +export interface TokenMintedData { + amount: i128; + minted_at: u64; + minter: string; + to: string; + token: string; +} + + +export interface MultisigTransactionProposedData { + current_signatures: u32; + nonce: u32; + operation_hash: Buffer; + proposed_at: u64; + proposer: string; + threshold: u32; +} + + +export interface MultisigTransactionExecutedData { + executed_at: u64; + nonce: u32; + operation_hash: Buffer; + signers: Array; +} + + +export interface MultisigConfigUpdatedData { + new_signers: Array; + new_threshold: u32; + old_signers: Array; + old_threshold: u32; + updated_at: u64; +} + + +export interface WalletToppedUpData { + amount: i128; + new_balance: i128; + source: string; + token: string; + topped_up_at: u64; + wallet: string; +} + + +export interface ContractErrorData { + context_data: Buffer; + contract_address: string; + error_message: Buffer; + error_type: string; + occurred_at: u64; +} + +export type DeFiEvent = {tag: "EscrowCreated", values: readonly [EscrowCreatedData]} | {tag: "EscrowReleased", values: readonly [EscrowReleasedData]} | {tag: "EscrowRefunded", values: readonly [EscrowRefundedData]} | {tag: "EscrowDisputeInitiated", values: readonly [EscrowDisputeInitiatedData]} | {tag: "EscrowDisputeResolved", values: readonly [EscrowDisputeResolvedData]} | {tag: "SwapOfferCreated", values: readonly [SwapOfferCreatedData]} | {tag: "SwapOfferAccepted", values: readonly [SwapOfferAcceptedData]} | {tag: "TokenTransferred", values: readonly [TokenTransferredData]} | {tag: "TokenMinted", values: readonly [TokenMintedData]} | {tag: "MultisigTransactionProposed", values: readonly [MultisigTransactionProposedData]} | {tag: "MultisigTransactionExecuted", values: readonly [MultisigTransactionExecutedData]} | {tag: "MultisigConfigUpdated", values: readonly [MultisigConfigUpdatedData]} | {tag: "WalletToppedUp", values: readonly [WalletToppedUpData]} | {tag: "ContractError", values: readonly [ContractErrorData]}; + +/** + * Supported currencies for conversion + */ +export type Currency = {tag: "NGN", values: void} | {tag: "USD", values: void} | {tag: "EUR", values: void} | {tag: "GBP", values: void} | {tag: "BTC", values: void} | {tag: "ETH", values: void}; + + +/** + * Exchange rate information + */ +export interface ExchangeRate { + /** + * Base currency + */ +from_currency: Currency; + /** + * Whether the rate is locked for transactions + */ +is_locked: boolean; + /** + * Exchange rate (scaled by 10^8 for precision) + */ +rate: i128; + /** + * Target currency + */ +to_currency: Currency; + /** + * Timestamp when rate was set + */ +updated_at: u64; + /** + * Rate validity duration in seconds + */ +validity_duration: u64; +} + + +/** + * User balance information + */ +export interface UserBalance { + /** + * Currency balances map + */ +balances: Map; + /** + * Last updated timestamp + */ +updated_at: u64; + /** + * User's address + */ +user: string; +} + + +/** + * Conversion transaction details + */ +export interface ConversionTx { + /** + * Amount to convert (in source currency) + */ +amount: i128; + /** + * Amount received (after fees) + */ +amount_received: i128; + /** + * Source currency + */ +from_currency: Currency; + /** + * Platform fee charged + */ +platform_fee: i128; + /** + * Exchange rate used + */ +rate: i128; + /** + * Transaction status + */ +status: ConversionStatus; + /** + * Timestamp of conversion + */ +timestamp: u64; + /** + * Target currency + */ +to_currency: Currency; + /** + * Transaction ID + */ +tx_id: string; + /** + * User performing conversion + */ +user: string; +} + +/** + * Status of conversion transaction + */ +export type ConversionStatus = {tag: "Pending", values: void} | {tag: "Completed", values: void} | {tag: "Failed", values: void} | {tag: "Cancelled", values: void}; + + +/** + * Platform configuration + */ +export interface PlatformConfig { + /** + * Platform admin + */ +admin: string; + /** + * Platform fee in basis points (e.g., 50 = 0.5%) + */ +fee_bps: u32; + /** + * Fee collector address + */ +fee_collector: string; + /** + * Maximum conversion amount per transaction + */ +max_conversion_amount: i128; + /** + * Minimum conversion amount + */ +min_conversion_amount: i128; + /** + * Rate lock duration in seconds + */ +rate_lock_duration: u64; +} + +/** + * Events emitted by the conversion contract + */ +export type ConversionEvent = {tag: "ConversionCompleted", values: readonly [string, string, Currency, Currency, i128, i128, i128]} | {tag: "RateUpdated", values: readonly [Currency, Currency, i128, u64]} | {tag: "RateLocked", values: readonly [Currency, Currency, i128, u64]} | {tag: "FeeCollected", values: readonly [Currency, i128, string]}; + +/** + * Storage keys for the contract + */ +export type DataKey = {tag: "Config", values: void} | {tag: "Rate", values: readonly [Currency, Currency]} | {tag: "Balance", values: readonly [string]} | {tag: "Transaction", values: readonly [string]} | {tag: "TxCounter", values: void} | {tag: "SupportedCurrencies", values: void}; + + +/** + * Liquidity pool for a specific currency + */ +export interface LiquidityPool { + /** + * Available liquidity for conversions + */ +available_liquidity: i128; + /** + * Pool creation timestamp + */ +created_at: u64; + /** + * Currency of the pool + */ +currency: Currency; + /** + * Last activity timestamp + */ +last_activity_at: u64; + /** + * Minimum liquidity threshold + */ +min_liquidity_threshold: i128; + /** + * Number of liquidity providers + */ +provider_count: u32; + /** + * Reserved liquidity (locked in active conversions) + */ +reserved_liquidity: i128; + /** + * Total liquidity in the pool + */ +total_liquidity: i128; + /** + * Pool utilization rate (basis points) + */ +utilization_rate_bps: u32; +} + + +/** + * Individual liquidity provider position + */ +export interface LiquidityPosition { + /** + * Accumulated rewards from conversions + */ +accumulated_rewards: i128; + /** + * Timestamp when liquidity was added + */ +added_at: u64; + /** + * Currency of the position + */ +currency: Currency; + /** + * Last time position was modified + */ +last_modified_at: u64; + /** + * Amount of liquidity provided + */ +liquidity_amount: i128; + /** + * Lock period end timestamp (0 if not locked) + */ +lock_until: u64; + /** + * Share of the pool (basis points) + */ +pool_share_bps: u32; + /** + * Provider's address + */ +provider: string; +} + + +/** + * Pool manager configuration + */ +export interface PoolManagerConfig { + /** + * Administrator address + */ +admin: string; + /** + * Default liquidity lock period (seconds) + */ +default_lock_period: u64; + /** + * Emergency pause flag + */ +is_paused: boolean; + /** + * Maximum liquidity amount per provider + */ +max_liquidity_amount: i128; + /** + * Minimum liquidity amount per provider + */ +min_liquidity_amount: i128; + /** + * Reward rate for liquidity providers (basis points) + */ +provider_reward_rate_bps: u32; + /** + * Pool utilization threshold for warnings (basis points) + */ +utilization_warning_bps: u32; +} + +/** + * Pool manager events + */ +export type PoolManagerEvent = {tag: "LiquidityAdded", values: readonly [string, Currency, i128, u32]} | {tag: "LiquidityRemoved", values: readonly [string, Currency, i128, u32]} | {tag: "PoolBalanceUpdated", values: readonly [Currency, i128, i128, i128]} | {tag: "ProviderRewarded", values: readonly [string, Currency, i128]} | {tag: "PoolUtilizationWarning", values: readonly [Currency, u32]} | {tag: "EmergencyPauseActivated", values: readonly [string]} | {tag: "EmergencyPauseDeactivated", values: readonly [string]}; + +/** + * Storage keys for pool manager + */ +export type PoolDataKey = {tag: "PoolConfig", values: void} | {tag: "Pool", values: readonly [Currency]} | {tag: "Position", values: readonly [string, Currency]} | {tag: "PositionCounter", values: void} | {tag: "ActiveCurrencies", values: void} | {tag: "UtilizationHistory", values: readonly [Currency, u64]} | {tag: "ProviderRewards", values: readonly [string]} | {tag: "CurrencyProviders", values: readonly [Currency]}; + +export type AppError = {tag: "InvalidAmount", values: void} | {tag: "InvalidAddress", values: void} | {tag: "InvalidTimestamp", values: void} | {tag: "InsufficientBalance", values: void} | {tag: "UnsupportedCurrency", values: void} | {tag: "RateExpired", values: void} | {tag: "ConversionLimitExceeded", values: void} | {tag: "Unauthorized", values: void}; + + +export interface TokenConfig { + admin: string; + decimals: u32; + name: string; + symbol: string; +} + + +export interface Balance { + amount: i128; +} + + +export interface MultiSigConfig { + nonce: u32; + signers: Array; + threshold: u32; +} + + +export interface Transaction { + nonce: u32; + operation: Buffer; + timestamp: u64; +} + +export const RateLockError = { + 1: {message:"NoRateLocked"}, + 2: {message:"RateExpired"} +} + +export const ContractError = { + 1: {message:"InvalidNonce"} +} + +export type Event = {tag: "FeeCollected", values: readonly [string, i128]} | {tag: "OfferCreated", values: readonly [u64, string, i128]} | {tag: "OfferAccepted", values: readonly [u64, string]} | {tag: "OfferCancelled", values: readonly [u64]}; + + +/** + * Represents a swap offer in the contract's storage + */ +export interface SwapOffer { + creator: string; + expires_at: u64; + offer_amount: i128; + offer_token: string; + request_amount: i128; + request_token: string; +} + + +export interface SwapConfig { + admin: string; + fee_bps: u32; + fee_collector: string; +} + +export type DataKey = {tag: "Config", values: void} | {tag: "TotalDistributed", values: readonly [string]}; + + +export interface FeeDistributionConfig { + admin: string; + reward_pool_address: string; + reward_pool_bps: u32; + treasury_address: string; + treasury_bps: u32; +} + + +export interface TokenDistributionTotals { + to_reward_pool: i128; + to_treasury: i128; +} + + +export interface FeeDistributedEvent { + fee_token: string; + reward_pool_amount: i128; + reward_pool_dest: string; + total_collected_fee: i128; + treasury_amount: i128; + treasury_dest: string; +} + +export interface Client { + /** + * Construct and simulate a create transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Create a new escrow + */ + create: ({sender, recipient, token, amount, timeout_duration, dispute_period}: {sender: string, recipient: string, token: string, amount: i128, timeout_duration: u64, dispute_period: u64}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a release transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Release funds to the recipient (can only be called by sender) + */ + release: ({escrow_id}: {escrow_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a refund transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Refund the tokens back to the sender (can be called by both sender and recipient) + */ + refund: ({escrow_id}: {escrow_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a check_timeout transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Check if the escrow has timed out and release funds if necessary + */ + check_timeout: ({escrow_id}: {escrow_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_escrow transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get information about an escrow + */ + get_escrow: ({escrow_id}: {escrow_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_all_escrows transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get all active escrows + */ + get_all_escrows: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a initiate_dispute transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Initiate a dispute (can be called by sender or recipient) + */ + initiate_dispute: ({escrow_id, reason}: {escrow_id: string, reason: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a resolve_dispute_for_recipient transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Resolve dispute in favor of recipient (admin function or automated) + */ + resolve_dispute_for_recipient: ({escrow_id}: {escrow_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a resolve_dispute_for_sender transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Resolve dispute in favor of sender (admin function or automated) + */ + resolve_dispute_for_sender: ({escrow_id}: {escrow_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a check_dispute_timeout transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Check if dispute has timed out and auto-resolve (default to recipient) + */ + check_dispute_timeout: ({escrow_id}: {escrow_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_dispute_info transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get dispute information for an escrow + */ + get_dispute_info: ({escrow_id}: {escrow_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a can_dispute transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Check if an escrow can be disputed (is active and no existing dispute) + */ + can_dispute: ({escrow_id}: {escrow_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_escrow_count transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get escrow count for statistics + */ + get_escrow_count: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a escrow_exists transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Check if escrow exists + */ + escrow_exists: ({escrow_id}: {escrow_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_escrows_by_status transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get escrows by status for filtering + */ + get_escrows_by_status: ({status}: {status: EscrowStatus}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a get_escrows_by_participant transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get escrows by participant (sender or recipient) + */ + get_escrows_by_participant: ({participant}: {participant: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a update_dispute_period transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Update dispute period for an active escrow (only by sender before dispute) + */ + update_dispute_period: ({escrow_id, new_dispute_period}: {escrow_id: string, new_dispute_period: u64}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a initialize transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Initialize contract with admin (should be called once during deployment) + */ + initialize: ({admin}: {admin: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a set_dispute_fee transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Set dispute fee (admin only) + */ + set_dispute_fee: ({fee}: {fee: i128}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_dispute_fee transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get current dispute fee + */ + get_dispute_fee: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_admin transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get contract admin + */ + get_admin: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a transfer_admin transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Transfer admin rights (admin only) + */ + transfer_admin: ({new_admin}: {new_admin: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a set_paused transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Emergency pause/unpause functionality (admin only) + */ + set_paused: ({paused}: {paused: boolean}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a is_paused transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Check if contract is paused + */ + is_paused: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a admin_resolve_dispute transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Admin emergency resolution (admin only, for extreme cases) + */ + admin_resolve_dispute: ({escrow_id, resolve_for_recipient}: {escrow_id: string, resolve_for_recipient: boolean}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a initialize_conversion transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Initialize the conversion contract + */ + initialize_conversion: ({admin, fee_bps, fee_collector, min_amount, max_amount}: {admin: string, fee_bps: u32, fee_collector: string, min_amount: i128, max_amount: i128}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a update_rate transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Update exchange rate for a currency pair + */ + update_rate: ({from_currency, to_currency, rate, validity_duration}: {from_currency: Currency, to_currency: Currency, rate: i128, validity_duration: u64}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a conversion_rate transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Lock exchange rate for a transaction + */ + conversion_rate: ({from_currency, to_currency}: {from_currency: Currency, to_currency: Currency}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a convert_currency transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Perform currency conversion + */ + convert_currency: ({user, from_currency, to_currency, amount}: {user: string, from_currency: Currency, to_currency: Currency, amount: i128}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_user_balance transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get user balance for all currencies + */ + get_user_balance: ({user}: {user: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_transaction transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get conversion transaction details + */ + get_transaction: ({tx_id}: {tx_id: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_rate transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get current exchange rate + */ + get_rate: ({from_currency, to_currency}: {from_currency: Currency, to_currency: Currency}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_conversion_config transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get platform configuration + */ + get_conversion_config: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a deposit transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + deposit: ({user, currency, amount}: {user: string, currency: Currency, amount: i128}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a initialize_pool_manager transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Initialize the pool manager + */ + initialize_pool_manager: ({admin, min_liquidity, max_liquidity, lock_period, reward_rate_bps}: {admin: string, min_liquidity: i128, max_liquidity: i128, lock_period: u64, reward_rate_bps: u32}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a add_liquidity transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Add liquidity to a currency pool + */ + add_liquidity: ({provider, currency, amount, lock_period}: {provider: string, currency: Currency, amount: i128, lock_period: Option}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a remove_liquidity transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Remove liquidity from a currency pool + */ + remove_liquidity: ({provider, currency, amount}: {provider: string, currency: Currency, amount: i128}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a update_pool_on_conversion transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Update pool balance during conversion operations + */ + update_pool_on_conversion: ({from_currency, to_currency, from_amount, to_amount}: {from_currency: Currency, to_currency: Currency, from_amount: i128, to_amount: i128}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a distribute_rewards transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Distribute rewards to liquidity providers + */ + distribute_rewards: ({currency, total_fee_amount}: {currency: Currency, total_fee_amount: i128}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a get_pool transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get liquidity pool information + */ + get_pool: ({currency}: {currency: Currency}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_position transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get liquidity position for a provider + */ + get_position: ({provider, currency}: {provider: string, currency: Currency}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_pool_config transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get pool manager configuration + */ + get_pool_config: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_active_currencies transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Get all active currencies with pools + */ + get_active_currencies: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a emergency_pause transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Emergency pause functionality + */ + emergency_pause: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a resume_operations transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Resume operations after emergency pause + */ + resume_operations: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a init transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + init: ({backend}: {backend: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a mint_token transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + mint_token: ({recipient, amount, token}: {recipient: string, amount: i128, token: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a initialize_token transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + initialize_token: ({admin, name, symbol, decimals}: {admin: string, name: string, symbol: string, decimals: u32}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a mint transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + mint: ({minter, to, amount}: {minter: string, to: string, amount: i128}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a transfer transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + transfer: ({from, to, amount}: {from: string, to: string, amount: i128}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a balance transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + balance: ({of}: {of: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_token_config transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + get_token_config: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a initialize_multisig transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + initialize_multisig: ({signers, threshold}: {signers: Array, threshold: u32}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a propose_transaction transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + propose_transaction: ({operation, signatures, proposer}: {operation: Buffer, signatures: Array, proposer: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a get_multisig_config transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + get_multisig_config: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a update_multisig_config transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + update_multisig_config: ({new_signers, new_threshold, proposer}: {new_signers: Array, new_threshold: u32, proposer: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a lock_rate transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + lock_rate: ({user, rate, duration_seconds}: {user: string, rate: i128, duration_seconds: u64}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a validate_conversion transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + validate_conversion: ({user}: {user: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a get_nonce transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + get_nonce: ({user}: {user: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + + /** + * Construct and simulate a check_and_update_nonce transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + check_and_update_nonce: ({user, incoming}: {user: string, incoming: u64}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a initialize_fees transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + initialize_fees: ({admin, treasury_address, reward_pool_address, treasury_bps, reward_pool_bps}: {admin: string, treasury_address: string, reward_pool_address: string, treasury_bps: u32, reward_pool_bps: u32}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a update_fees_config transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + update_fees_config: ({treasury_address, reward_pool_address, treasury_bps, reward_pool_bps}: {treasury_address: Option, reward_pool_address: Option, treasury_bps: Option, reward_pool_bps: Option}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a get_fees_config transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + get_fees_config: (options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a distribute_fees transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + * Distributes collected fees to treasury and reward pools. + * This function should be called by the contract that collected the fees. + * `fee_collector_contract` is the address holding the `total_fee_amount`. + */ + distribute_fees: ({fee_token, total_fee_amount, fee_collector_contract}: {fee_token: string, total_fee_amount: i128, fee_collector_contract: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise>> + + /** + * Construct and simulate a get_total_distributed transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object. + */ + get_total_distributed: ({token}: {token: string}, options?: { + /** + * The fee to pay for the transaction. Default: BASE_FEE + */ + fee?: number; + + /** + * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT + */ + timeoutInSeconds?: number; + + /** + * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true + */ + simulate?: boolean; + }) => Promise> + +} +export class Client extends ContractClient { + static async deploy( + /** Options for initializing a Client as well as for calling a method, with extras specific to deploying. */ + options: MethodOptions & + Omit & { + /** The hash of the Wasm blob, which must already be installed on-chain. */ + wasmHash: Buffer | string; + /** Salt used to generate the contract's ID. Passed through to {@link Operation.createCustomContract}. Default: random. */ + salt?: Buffer | Uint8Array; + /** The format used to decode `wasmHash`, if it's provided as a string. */ + format?: "hex" | "base64"; + } + ): Promise> { + return ContractClient.deploy(null, options) + } + constructor(public readonly options: ContractClientOptions) { + super( + new ContractSpec([ "AAAAAgAAAB5TdGF0dXMgb2YgdGhlIGVzY3JvdyBvcGVyYXRpb24AAAAAAAAAAAAMRXNjcm93U3RhdHVzAAAABwAAAAAAAAAlRXNjcm93IGlzIGFjdGl2ZSBhbmQgZnVuZHMgYXJlIGxvY2tlZAAAAAAAAAZBY3RpdmUAAAAAAAAAAAAcQSBkaXNwdXRlIGhhcyBiZWVuIGluaXRpYXRlZAAAAAhEaXNwdXRlZAAAAAAAAAApRnVuZHMgaGF2ZSBiZWVuIHJlbGVhc2VkIHRvIHRoZSByZWNpcGllbnQAAAAAAAAIUmVsZWFzZWQAAAAAAAAAJkZ1bmRzIGhhdmUgYmVlbiByZXR1cm5lZCB0byB0aGUgc2VuZGVyAAAAAAAIUmVmdW5kZWQAAAAAAAAAL0Z1bmRzIHdlcmUgYXV0b21hdGljYWxseSByZWxlYXNlZCBhZnRlciB0aW1lb3V0AAAAAAxBdXRvUmVsZWFzZWQAAAAAAAAAKkRpc3B1dG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AAAAAAAA9yZXdhcmRfcG9vbF9icHMAAAAD6AAAAAQAAAABAAAD6QAAB9AAAAAVRmVlRGlzdHJpYnV0aW9uQ29uZmlnAAAAAAAAAw==", + "AAAAAAAAAAAAAAAPZ2V0X2ZlZXNfY29uZmlnAAAAAAAAAAABAAAD6QAAB9AAAAAVRmVlRGlzdHJpYnV0aW9uQ29uZmlnAAAAAAAAAw==", + "AAAAAAAAAMhEaXN0cmlidXRlcyBjb2xsZWN0ZWQgZmVlcyB0byB0cmVhc3VyeSBhbmQgcmV3YXJkIHBvb2xzLgpUaGlzIGZ1bmN0aW9uIHNob3VsZCBiZSBjYWxsZWQgYnkgdGhlIGNvbnRyYWN0IHRoYXQgY29sbGVjdGVkIHRoZSBmZWVzLgpgZmVlX2NvbGxlY3Rvcl9jb250cmFjdGAgaXMgdGhlIGFkZHJlc3MgaG9sZGluZyB0aGUgYHRvdGFsX2ZlZV9hbW91bnRgLgAAAA9kaXN0cmlidXRlX2ZlZXMAAAAAAwAAAAAAAAAJZmVlX3Rva2VuAAAAAAAAEwAAAAAAAAAQdG90YWxfZmVlX2Ftb3VudAAAAAsAAAAAAAAAFmZlZV9jb2xsZWN0b3JfY29udHJhY3QAAAAAABMAAAABAAAD6QAAA+0AAAAAAAAAAw==", + "AAAAAAAAAAAAAAAVZ2V0X3RvdGFsX2Rpc3RyaWJ1dGVkAAAAAAAAAQAAAAAAAAAFdG9rZW4AAAAAAAATAAAAAQAAB9AAAAAXVG9rZW5EaXN0cmlidXRpb25Ub3RhbHMA" ]), + options + ) + } + public readonly fromJSON = { + create: this.txFromJSON, + release: this.txFromJSON, + refund: this.txFromJSON, + check_timeout: this.txFromJSON, + get_escrow: this.txFromJSON, + get_all_escrows: this.txFromJSON>, + initiate_dispute: this.txFromJSON, + resolve_dispute_for_recipient: this.txFromJSON, + resolve_dispute_for_sender: this.txFromJSON, + check_dispute_timeout: this.txFromJSON, + get_dispute_info: this.txFromJSON>, + can_dispute: this.txFromJSON, + get_escrow_count: this.txFromJSON, + escrow_exists: this.txFromJSON, + get_escrows_by_status: this.txFromJSON>, + get_escrows_by_participant: this.txFromJSON>, + update_dispute_period: this.txFromJSON, + initialize: this.txFromJSON, + set_dispute_fee: this.txFromJSON, + get_dispute_fee: this.txFromJSON, + get_admin: this.txFromJSON, + transfer_admin: this.txFromJSON, + set_paused: this.txFromJSON, + is_paused: this.txFromJSON, + admin_resolve_dispute: this.txFromJSON, + initialize_conversion: this.txFromJSON, + update_rate: this.txFromJSON, + conversion_rate: this.txFromJSON, + convert_currency: this.txFromJSON, + get_user_balance: this.txFromJSON, + get_transaction: this.txFromJSON, + get_rate: this.txFromJSON, + get_conversion_config: this.txFromJSON, + deposit: this.txFromJSON, + initialize_pool_manager: this.txFromJSON, + add_liquidity: this.txFromJSON, + remove_liquidity: this.txFromJSON, + update_pool_on_conversion: this.txFromJSON, + distribute_rewards: this.txFromJSON>, + get_pool: this.txFromJSON, + get_position: this.txFromJSON, + get_pool_config: this.txFromJSON, + get_active_currencies: this.txFromJSON>, + emergency_pause: this.txFromJSON, + resume_operations: this.txFromJSON, + init: this.txFromJSON, + mint_token: this.txFromJSON, + initialize_token: this.txFromJSON, + mint: this.txFromJSON, + transfer: this.txFromJSON, + balance: this.txFromJSON, + get_token_config: this.txFromJSON, + initialize_multisig: this.txFromJSON, + propose_transaction: this.txFromJSON, + get_multisig_config: this.txFromJSON, + update_multisig_config: this.txFromJSON, + lock_rate: this.txFromJSON, + validate_conversion: this.txFromJSON>, + get_nonce: this.txFromJSON, + check_and_update_nonce: this.txFromJSON>, + initialize_fees: this.txFromJSON>, + update_fees_config: this.txFromJSON>, + get_fees_config: this.txFromJSON>, + distribute_fees: this.txFromJSON>, + get_total_distributed: this.txFromJSON + } +} \ No newline at end of file diff --git a/bindings/dist/tsconfig.json b/bindings/dist/tsconfig.json new file mode 100644 index 0000000..acac142 --- /dev/null +++ b/bindings/dist/tsconfig.json @@ -0,0 +1,98 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + /* Language and Environment */ + "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + /* Modules */ + "module": "NodeNext", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + "moduleResolution": "nodenext", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + "outDir": "./dist", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + // "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + // "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + /* Type Checking */ + // "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "include": [ + "src/*" + ] +} \ No newline at end of file From 2e20eaf127429e3e0e9190edcfef750aa5fe9149 Mon Sep 17 00:00:00 2001 From: Deborah Olaboye Date: Wed, 1 Oct 2025 08:01:59 +0100 Subject: [PATCH 3/3] feat: deployed the smart contract --- .gitignore | 4 + deployment/addresses.json | 14 + src/conversion.rs | 2 +- test_snapshots/test_add_liquidity.1.json | 548 ++++++++ .../test_add_liquidity_above_maximum.1.json | 246 ++++ .../test_add_liquidity_below_minimum.1.json | 246 ++++ ...st_add_liquidity_multiple_providers.1.json | 716 ++++++++++ .../test_add_liquidity_while_paused.1.json | 294 +++++ ...t_conversion_insufficient_liquidity.1.json | 550 ++++++++ .../test_emergency_pause_and_resume.1.json | 343 +++++ .../test_get_active_currencies.1.json | 851 ++++++++++++ .../test_initialize_pool_manager.1.json | 245 ++++ ...st_initialize_with_high_reward_rate.1.json | 76 ++ ...test_initialize_with_invalid_limits.1.json | 76 ++ .../test_multiple_currency_pools.1.json | 1155 +++++++++++++++++ .../test_pool_utilization_calculation.1.json | 855 ++++++++++++ .../test_remove_all_liquidity.1.json | 514 ++++++++ test_snapshots/test_remove_liquidity.1.json | 615 +++++++++ .../test_remove_liquidity_while_locked.1.json | 550 ++++++++ .../test_remove_more_than_available.1.json | 550 ++++++++ ...t_update_pool_balance_on_conversion.1.json | 952 ++++++++++++++ 21 files changed, 9401 insertions(+), 1 deletion(-) create mode 100644 deployment/addresses.json create mode 100644 test_snapshots/test_add_liquidity.1.json create mode 100644 test_snapshots/test_add_liquidity_above_maximum.1.json create mode 100644 test_snapshots/test_add_liquidity_below_minimum.1.json create mode 100644 test_snapshots/test_add_liquidity_multiple_providers.1.json create mode 100644 test_snapshots/test_add_liquidity_while_paused.1.json create mode 100644 test_snapshots/test_conversion_insufficient_liquidity.1.json create mode 100644 test_snapshots/test_emergency_pause_and_resume.1.json create mode 100644 test_snapshots/test_get_active_currencies.1.json create mode 100644 test_snapshots/test_initialize_pool_manager.1.json create mode 100644 test_snapshots/test_initialize_with_high_reward_rate.1.json create mode 100644 test_snapshots/test_initialize_with_invalid_limits.1.json create mode 100644 test_snapshots/test_multiple_currency_pools.1.json create mode 100644 test_snapshots/test_pool_utilization_calculation.1.json create mode 100644 test_snapshots/test_remove_all_liquidity.1.json create mode 100644 test_snapshots/test_remove_liquidity.1.json create mode 100644 test_snapshots/test_remove_liquidity_while_locked.1.json create mode 100644 test_snapshots/test_remove_more_than_available.1.json create mode 100644 test_snapshots/test_update_pool_balance_on_conversion.1.json diff --git a/.gitignore b/.gitignore index aee07bc..ea1b27d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,10 @@ node_modules/ # Build outputs dist/ +# Keep generated TypeScript bindings in repo for backend integration +!bindings/dist/ +!bindings/dist/** + # Logs *.log diff --git a/deployment/addresses.json b/deployment/addresses.json new file mode 100644 index 0000000..d420924 --- /dev/null +++ b/deployment/addresses.json @@ -0,0 +1,14 @@ +{ + "testnet": { + "network": "Stellar Testnet", + "rpcUrl": "https://soroban-testnet.stellar.org", + "networkPassphrase": "Test SDF Network ; September 2015", + "contractId": "CAP37IIFD2EZJKE3A25GKNO2SURW2K2PBPQJ2VLP6CL6YB5RDSCAWMIP", + "explorerUrl": "https://stellar.expert/explorer/testnet/contract/CAP37IIFD2EZJKE3A25GKNO2SURW2K2PBPQJ2VLP6CL6YB5RDSCAWMIP", + "notes": "Deployed via soroban CLI" + }, + "metadata": { + "updatedAt": "2025-10-01T07:45:53+01:00", + "deployer": "deployment" + } +} diff --git a/src/conversion.rs b/src/conversion.rs index 9dbf52b..6a2af5d 100644 --- a/src/conversion.rs +++ b/src/conversion.rs @@ -259,7 +259,7 @@ impl ConversionContract { } /// Lock exchange rate for a transaction - pub fn lock_rate(env: Env, from_currency: Currency, to_currency: Currency) -> ExchangeRate { + pub fn conversion_rate(env: Env, from_currency: Currency, to_currency: Currency) -> ExchangeRate { let config: PlatformConfig = env.storage().instance().get(&DataKey::Config).unwrap(); let mut rate_info: ExchangeRate = env .storage() diff --git a/test_snapshots/test_add_liquidity.1.json b/test_snapshots/test_add_liquidity.1.json new file mode 100644 index 0000000..e5e4fc1 --- /dev/null +++ b/test_snapshots/test_add_liquidity.1.json @@ -0,0 +1,548 @@ +{ + "generators": { + "address": 3, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "initialize_pool_manager", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + }, + { + "i128": { + "hi": 0, + "lo": 1000000000 + } + }, + { + "i128": { + "hi": 0, + "lo": 100000000000 + } + }, + { + "u64": 86400 + }, + { + "u32": 50 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "add_liquidity", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + }, + { + "i128": { + "hi": 0, + "lo": 5000000000 + } + }, + "void" + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 10, + "timestamp": 1000, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 10, + "min_persistent_entry_ttl": 10, + "min_temp_entry_ttl": 10, + "max_entry_ttl": 3110400, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "ActiveCurrencies" + } + ] + }, + "val": { + "vec": [ + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "CurrencyProviders" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "vec": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Pool" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "available_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 5000000000 + } + } + }, + { + "key": { + "symbol": "created_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_activity_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "min_liquidity_threshold" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000 + } + } + }, + { + "key": { + "symbol": "provider_count" + }, + "val": { + "u32": 1 + } + }, + { + "key": { + "symbol": "reserved_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "total_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 5000000000 + } + } + }, + { + "key": { + "symbol": "utilization_rate_bps" + }, + "val": { + "u32": 0 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PoolConfig" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "admin" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + }, + { + "key": { + "symbol": "default_lock_period" + }, + "val": { + "u64": 86400 + } + }, + { + "key": { + "symbol": "is_paused" + }, + "val": { + "bool": false + } + }, + { + "key": { + "symbol": "max_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000000 + } + } + }, + { + "key": { + "symbol": "min_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 1000000000 + } + } + }, + { + "key": { + "symbol": "provider_reward_rate_bps" + }, + "val": { + "u32": 50 + } + }, + { + "key": { + "symbol": "utilization_warning_bps" + }, + "val": { + "u32": 8000 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Position" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "accumulated_rewards" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "added_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_modified_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 5000000000 + } + } + }, + { + "key": { + "symbol": "lock_until" + }, + "val": { + "u64": 87400 + } + }, + { + "key": { + "symbol": "pool_share_bps" + }, + "val": { + "u32": 10000 + } + }, + { + "key": { + "symbol": "provider" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PositionCounter" + } + ] + }, + "val": { + "u64": 0 + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 19 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 19 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/test_snapshots/test_add_liquidity_above_maximum.1.json b/test_snapshots/test_add_liquidity_above_maximum.1.json new file mode 100644 index 0000000..044f8fb --- /dev/null +++ b/test_snapshots/test_add_liquidity_above_maximum.1.json @@ -0,0 +1,246 @@ +{ + "generators": { + "address": 3, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "initialize_pool_manager", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + }, + { + "i128": { + "hi": 0, + "lo": 1000000000 + } + }, + { + "i128": { + "hi": 0, + "lo": 100000000000 + } + }, + { + "u64": 86400 + }, + { + "u32": 50 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "ActiveCurrencies" + } + ] + }, + "val": { + "vec": [] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PoolConfig" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "admin" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + }, + { + "key": { + "symbol": "default_lock_period" + }, + "val": { + "u64": 86400 + } + }, + { + "key": { + "symbol": "is_paused" + }, + "val": { + "bool": false + } + }, + { + "key": { + "symbol": "max_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000000 + } + } + }, + { + "key": { + "symbol": "min_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 1000000000 + } + } + }, + { + "key": { + "symbol": "provider_reward_rate_bps" + }, + "val": { + "u32": 50 + } + }, + { + "key": { + "symbol": "utilization_warning_bps" + }, + "val": { + "u32": 8000 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PositionCounter" + } + ] + }, + "val": { + "u64": 0 + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/test_snapshots/test_add_liquidity_below_minimum.1.json b/test_snapshots/test_add_liquidity_below_minimum.1.json new file mode 100644 index 0000000..044f8fb --- /dev/null +++ b/test_snapshots/test_add_liquidity_below_minimum.1.json @@ -0,0 +1,246 @@ +{ + "generators": { + "address": 3, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "initialize_pool_manager", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + }, + { + "i128": { + "hi": 0, + "lo": 1000000000 + } + }, + { + "i128": { + "hi": 0, + "lo": 100000000000 + } + }, + { + "u64": 86400 + }, + { + "u32": 50 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "ActiveCurrencies" + } + ] + }, + "val": { + "vec": [] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PoolConfig" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "admin" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + }, + { + "key": { + "symbol": "default_lock_period" + }, + "val": { + "u64": 86400 + } + }, + { + "key": { + "symbol": "is_paused" + }, + "val": { + "bool": false + } + }, + { + "key": { + "symbol": "max_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000000 + } + } + }, + { + "key": { + "symbol": "min_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 1000000000 + } + } + }, + { + "key": { + "symbol": "provider_reward_rate_bps" + }, + "val": { + "u32": 50 + } + }, + { + "key": { + "symbol": "utilization_warning_bps" + }, + "val": { + "u32": 8000 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PositionCounter" + } + ] + }, + "val": { + "u64": 0 + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/test_snapshots/test_add_liquidity_multiple_providers.1.json b/test_snapshots/test_add_liquidity_multiple_providers.1.json new file mode 100644 index 0000000..a17ef9f --- /dev/null +++ b/test_snapshots/test_add_liquidity_multiple_providers.1.json @@ -0,0 +1,716 @@ +{ + "generators": { + "address": 4, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "function_name": "initialize_pool_manager", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + }, + { + "i128": { + "hi": 0, + "lo": 1000000000 + } + }, + { + "i128": { + "hi": 0, + "lo": 100000000000 + } + }, + { + "u64": 86400 + }, + { + "u32": 50 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "function_name": "add_liquidity", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + }, + { + "i128": { + "hi": 0, + "lo": 6000000000 + } + }, + "void" + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "function_name": "add_liquidity", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + }, + { + "i128": { + "hi": 0, + "lo": 4000000000 + } + }, + "void" + ] + } + }, + "sub_invocations": [] + } + ] + ], + [], + [], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 10, + "timestamp": 1000, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 10, + "min_persistent_entry_ttl": 10, + "min_temp_entry_ttl": 10, + "max_entry_ttl": 3110400, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "ActiveCurrencies" + } + ] + }, + "val": { + "vec": [ + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "CurrencyProviders" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "vec": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Pool" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "available_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 10000000000 + } + } + }, + { + "key": { + "symbol": "created_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_activity_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "min_liquidity_threshold" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000 + } + } + }, + { + "key": { + "symbol": "provider_count" + }, + "val": { + "u32": 2 + } + }, + { + "key": { + "symbol": "reserved_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "total_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 10000000000 + } + } + }, + { + "key": { + "symbol": "utilization_rate_bps" + }, + "val": { + "u32": 0 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PoolConfig" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "admin" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + }, + { + "key": { + "symbol": "default_lock_period" + }, + "val": { + "u64": 86400 + } + }, + { + "key": { + "symbol": "is_paused" + }, + "val": { + "bool": false + } + }, + { + "key": { + "symbol": "max_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000000 + } + } + }, + { + "key": { + "symbol": "min_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 1000000000 + } + } + }, + { + "key": { + "symbol": "provider_reward_rate_bps" + }, + "val": { + "u32": 50 + } + }, + { + "key": { + "symbol": "utilization_warning_bps" + }, + "val": { + "u32": 8000 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Position" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "accumulated_rewards" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "added_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_modified_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 6000000000 + } + } + }, + { + "key": { + "symbol": "lock_until" + }, + "val": { + "u64": 87400 + } + }, + { + "key": { + "symbol": "pool_share_bps" + }, + "val": { + "u32": 6000 + } + }, + { + "key": { + "symbol": "provider" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Position" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "accumulated_rewards" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "added_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_modified_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 4000000000 + } + } + }, + { + "key": { + "symbol": "lock_until" + }, + "val": { + "u64": 87400 + } + }, + { + "key": { + "symbol": "pool_share_bps" + }, + "val": { + "u32": 4000 + } + }, + { + "key": { + "symbol": "provider" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PositionCounter" + } + ] + }, + "val": { + "u64": 0 + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 19 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 19 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/test_snapshots/test_add_liquidity_while_paused.1.json b/test_snapshots/test_add_liquidity_while_paused.1.json new file mode 100644 index 0000000..790fd92 --- /dev/null +++ b/test_snapshots/test_add_liquidity_while_paused.1.json @@ -0,0 +1,294 @@ +{ + "generators": { + "address": 3, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "initialize_pool_manager", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + }, + { + "i128": { + "hi": 0, + "lo": 1000000000 + } + }, + { + "i128": { + "hi": 0, + "lo": 100000000000 + } + }, + { + "u64": 86400 + }, + { + "u32": 50 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "emergency_pause", + "args": [] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "ActiveCurrencies" + } + ] + }, + "val": { + "vec": [] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PoolConfig" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "admin" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + }, + { + "key": { + "symbol": "default_lock_period" + }, + "val": { + "u64": 86400 + } + }, + { + "key": { + "symbol": "is_paused" + }, + "val": { + "bool": true + } + }, + { + "key": { + "symbol": "max_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000000 + } + } + }, + { + "key": { + "symbol": "min_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 1000000000 + } + } + }, + { + "key": { + "symbol": "provider_reward_rate_bps" + }, + "val": { + "u32": 50 + } + }, + { + "key": { + "symbol": "utilization_warning_bps" + }, + "val": { + "u32": 8000 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PositionCounter" + } + ] + }, + "val": { + "u64": 0 + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/test_snapshots/test_conversion_insufficient_liquidity.1.json b/test_snapshots/test_conversion_insufficient_liquidity.1.json new file mode 100644 index 0000000..e3fc63b --- /dev/null +++ b/test_snapshots/test_conversion_insufficient_liquidity.1.json @@ -0,0 +1,550 @@ +{ + "generators": { + "address": 3, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "initialize_pool_manager", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + }, + { + "i128": { + "hi": 0, + "lo": 1000000000 + } + }, + { + "i128": { + "hi": 0, + "lo": 100000000000 + } + }, + { + "u64": 86400 + }, + { + "u32": 50 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "add_liquidity", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + }, + { + "i128": { + "hi": 0, + "lo": 1000000000 + } + }, + { + "u64": 0 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 10, + "timestamp": 1000, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 10, + "min_persistent_entry_ttl": 10, + "min_temp_entry_ttl": 10, + "max_entry_ttl": 3110400, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "ActiveCurrencies" + } + ] + }, + "val": { + "vec": [ + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "CurrencyProviders" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "vec": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Pool" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "available_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 1000000000 + } + } + }, + { + "key": { + "symbol": "created_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_activity_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "min_liquidity_threshold" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000 + } + } + }, + { + "key": { + "symbol": "provider_count" + }, + "val": { + "u32": 1 + } + }, + { + "key": { + "symbol": "reserved_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "total_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 1000000000 + } + } + }, + { + "key": { + "symbol": "utilization_rate_bps" + }, + "val": { + "u32": 0 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PoolConfig" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "admin" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + }, + { + "key": { + "symbol": "default_lock_period" + }, + "val": { + "u64": 86400 + } + }, + { + "key": { + "symbol": "is_paused" + }, + "val": { + "bool": false + } + }, + { + "key": { + "symbol": "max_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000000 + } + } + }, + { + "key": { + "symbol": "min_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 1000000000 + } + } + }, + { + "key": { + "symbol": "provider_reward_rate_bps" + }, + "val": { + "u32": 50 + } + }, + { + "key": { + "symbol": "utilization_warning_bps" + }, + "val": { + "u32": 8000 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Position" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "accumulated_rewards" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "added_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_modified_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 1000000000 + } + } + }, + { + "key": { + "symbol": "lock_until" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "pool_share_bps" + }, + "val": { + "u32": 10000 + } + }, + { + "key": { + "symbol": "provider" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PositionCounter" + } + ] + }, + "val": { + "u64": 0 + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 19 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 19 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/test_snapshots/test_emergency_pause_and_resume.1.json b/test_snapshots/test_emergency_pause_and_resume.1.json new file mode 100644 index 0000000..3e6145d --- /dev/null +++ b/test_snapshots/test_emergency_pause_and_resume.1.json @@ -0,0 +1,343 @@ +{ + "generators": { + "address": 3, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "initialize_pool_manager", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + }, + { + "i128": { + "hi": 0, + "lo": 1000000000 + } + }, + { + "i128": { + "hi": 0, + "lo": 100000000000 + } + }, + { + "u64": 86400 + }, + { + "u32": 50 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "emergency_pause", + "args": [] + } + }, + "sub_invocations": [] + } + ] + ], + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "resume_operations", + "args": [] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "ActiveCurrencies" + } + ] + }, + "val": { + "vec": [] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PoolConfig" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "admin" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + }, + { + "key": { + "symbol": "default_lock_period" + }, + "val": { + "u64": 86400 + } + }, + { + "key": { + "symbol": "is_paused" + }, + "val": { + "bool": false + } + }, + { + "key": { + "symbol": "max_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000000 + } + } + }, + { + "key": { + "symbol": "min_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 1000000000 + } + } + }, + { + "key": { + "symbol": "provider_reward_rate_bps" + }, + "val": { + "u32": 50 + } + }, + { + "key": { + "symbol": "utilization_warning_bps" + }, + "val": { + "u32": 8000 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PositionCounter" + } + ] + }, + "val": { + "u64": 0 + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/test_snapshots/test_get_active_currencies.1.json b/test_snapshots/test_get_active_currencies.1.json new file mode 100644 index 0000000..17b5510 --- /dev/null +++ b/test_snapshots/test_get_active_currencies.1.json @@ -0,0 +1,851 @@ +{ + "generators": { + "address": 3, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "initialize_pool_manager", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + }, + { + "i128": { + "hi": 0, + "lo": 1000000000 + } + }, + { + "i128": { + "hi": 0, + "lo": 100000000000 + } + }, + { + "u64": 86400 + }, + { + "u32": 50 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "add_liquidity", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + }, + { + "i128": { + "hi": 0, + "lo": 5000000000 + } + }, + "void" + ] + } + }, + "sub_invocations": [] + } + ] + ], + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "add_liquidity", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "EUR" + } + ] + }, + { + "i128": { + "hi": 0, + "lo": 3000000000 + } + }, + "void" + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "ActiveCurrencies" + } + ] + }, + "val": { + "vec": [ + { + "vec": [ + { + "symbol": "USD" + } + ] + }, + { + "vec": [ + { + "symbol": "EUR" + } + ] + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "CurrencyProviders" + }, + { + "vec": [ + { + "symbol": "EUR" + } + ] + } + ] + }, + "val": { + "vec": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "CurrencyProviders" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "vec": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Pool" + }, + { + "vec": [ + { + "symbol": "EUR" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "available_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 3000000000 + } + } + }, + { + "key": { + "symbol": "created_at" + }, + "val": { + "u64": 0 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "EUR" + } + ] + } + }, + { + "key": { + "symbol": "last_activity_at" + }, + "val": { + "u64": 0 + } + }, + { + "key": { + "symbol": "min_liquidity_threshold" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000 + } + } + }, + { + "key": { + "symbol": "provider_count" + }, + "val": { + "u32": 1 + } + }, + { + "key": { + "symbol": "reserved_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "total_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 3000000000 + } + } + }, + { + "key": { + "symbol": "utilization_rate_bps" + }, + "val": { + "u32": 0 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Pool" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "available_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 5000000000 + } + } + }, + { + "key": { + "symbol": "created_at" + }, + "val": { + "u64": 0 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_activity_at" + }, + "val": { + "u64": 0 + } + }, + { + "key": { + "symbol": "min_liquidity_threshold" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000 + } + } + }, + { + "key": { + "symbol": "provider_count" + }, + "val": { + "u32": 1 + } + }, + { + "key": { + "symbol": "reserved_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "total_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 5000000000 + } + } + }, + { + "key": { + "symbol": "utilization_rate_bps" + }, + "val": { + "u32": 0 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PoolConfig" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "admin" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + }, + { + "key": { + "symbol": "default_lock_period" + }, + "val": { + "u64": 86400 + } + }, + { + "key": { + "symbol": "is_paused" + }, + "val": { + "bool": false + } + }, + { + "key": { + "symbol": "max_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000000 + } + } + }, + { + "key": { + "symbol": "min_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 1000000000 + } + } + }, + { + "key": { + "symbol": "provider_reward_rate_bps" + }, + "val": { + "u32": 50 + } + }, + { + "key": { + "symbol": "utilization_warning_bps" + }, + "val": { + "u32": 8000 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Position" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "EUR" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "accumulated_rewards" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "added_at" + }, + "val": { + "u64": 0 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "EUR" + } + ] + } + }, + { + "key": { + "symbol": "last_modified_at" + }, + "val": { + "u64": 0 + } + }, + { + "key": { + "symbol": "liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 3000000000 + } + } + }, + { + "key": { + "symbol": "lock_until" + }, + "val": { + "u64": 86400 + } + }, + { + "key": { + "symbol": "pool_share_bps" + }, + "val": { + "u32": 10000 + } + }, + { + "key": { + "symbol": "provider" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Position" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "accumulated_rewards" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "added_at" + }, + "val": { + "u64": 0 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_modified_at" + }, + "val": { + "u64": 0 + } + }, + { + "key": { + "symbol": "liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 5000000000 + } + } + }, + { + "key": { + "symbol": "lock_until" + }, + "val": { + "u64": 86400 + } + }, + { + "key": { + "symbol": "pool_share_bps" + }, + "val": { + "u32": 10000 + } + }, + { + "key": { + "symbol": "provider" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PositionCounter" + } + ] + }, + "val": { + "u64": 0 + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/test_snapshots/test_initialize_pool_manager.1.json b/test_snapshots/test_initialize_pool_manager.1.json new file mode 100644 index 0000000..14bc727 --- /dev/null +++ b/test_snapshots/test_initialize_pool_manager.1.json @@ -0,0 +1,245 @@ +{ + "generators": { + "address": 2, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "function_name": "initialize_pool_manager", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + }, + { + "i128": { + "hi": 0, + "lo": 1000000000 + } + }, + { + "i128": { + "hi": 0, + "lo": 100000000000 + } + }, + { + "u64": 86400 + }, + { + "u32": 50 + } + ] + } + }, + "sub_invocations": [] + } + ] + ] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "ActiveCurrencies" + } + ] + }, + "val": { + "vec": [] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PoolConfig" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "admin" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + }, + { + "key": { + "symbol": "default_lock_period" + }, + "val": { + "u64": 86400 + } + }, + { + "key": { + "symbol": "is_paused" + }, + "val": { + "bool": false + } + }, + { + "key": { + "symbol": "max_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000000 + } + } + }, + { + "key": { + "symbol": "min_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 1000000000 + } + } + }, + { + "key": { + "symbol": "provider_reward_rate_bps" + }, + "val": { + "u32": 50 + } + }, + { + "key": { + "symbol": "utilization_warning_bps" + }, + "val": { + "u32": 8000 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PositionCounter" + } + ] + }, + "val": { + "u64": 0 + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/test_snapshots/test_initialize_with_high_reward_rate.1.json b/test_snapshots/test_initialize_with_high_reward_rate.1.json new file mode 100644 index 0000000..abf68a6 --- /dev/null +++ b/test_snapshots/test_initialize_with_high_reward_rate.1.json @@ -0,0 +1,76 @@ +{ + "generators": { + "address": 2, + "nonce": 0 + }, + "auth": [ + [], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": null + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/test_snapshots/test_initialize_with_invalid_limits.1.json b/test_snapshots/test_initialize_with_invalid_limits.1.json new file mode 100644 index 0000000..abf68a6 --- /dev/null +++ b/test_snapshots/test_initialize_with_invalid_limits.1.json @@ -0,0 +1,76 @@ +{ + "generators": { + "address": 2, + "nonce": 0 + }, + "auth": [ + [], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": null + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/test_snapshots/test_multiple_currency_pools.1.json b/test_snapshots/test_multiple_currency_pools.1.json new file mode 100644 index 0000000..bb72d53 --- /dev/null +++ b/test_snapshots/test_multiple_currency_pools.1.json @@ -0,0 +1,1155 @@ +{ + "generators": { + "address": 4, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "function_name": "initialize_pool_manager", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + }, + { + "i128": { + "hi": 0, + "lo": 1000000000 + } + }, + { + "i128": { + "hi": 0, + "lo": 100000000000 + } + }, + { + "u64": 86400 + }, + { + "u32": 50 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "function_name": "add_liquidity", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + }, + { + "i128": { + "hi": 0, + "lo": 10000000000 + } + }, + "void" + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "function_name": "add_liquidity", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "EUR" + } + ] + }, + { + "i128": { + "hi": 0, + "lo": 8000000000 + } + }, + "void" + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "function_name": "add_liquidity", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + }, + { + "vec": [ + { + "symbol": "BTC" + } + ] + }, + { + "i128": { + "hi": 0, + "lo": 5000000000 + } + }, + "void" + ] + } + }, + "sub_invocations": [] + } + ] + ], + [], + [], + [], + [], + [], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": { + "ledger_key_nonce": { + "nonce": 4837995959683129791 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": { + "ledger_key_nonce": { + "nonce": 4837995959683129791 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "ActiveCurrencies" + } + ] + }, + "val": { + "vec": [ + { + "vec": [ + { + "symbol": "USD" + } + ] + }, + { + "vec": [ + { + "symbol": "EUR" + } + ] + }, + { + "vec": [ + { + "symbol": "BTC" + } + ] + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "CurrencyProviders" + }, + { + "vec": [ + { + "symbol": "BTC" + } + ] + } + ] + }, + "val": { + "vec": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "CurrencyProviders" + }, + { + "vec": [ + { + "symbol": "EUR" + } + ] + } + ] + }, + "val": { + "vec": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "CurrencyProviders" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "vec": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Pool" + }, + { + "vec": [ + { + "symbol": "BTC" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "available_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 5000000000 + } + } + }, + { + "key": { + "symbol": "created_at" + }, + "val": { + "u64": 0 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "BTC" + } + ] + } + }, + { + "key": { + "symbol": "last_activity_at" + }, + "val": { + "u64": 0 + } + }, + { + "key": { + "symbol": "min_liquidity_threshold" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000 + } + } + }, + { + "key": { + "symbol": "provider_count" + }, + "val": { + "u32": 1 + } + }, + { + "key": { + "symbol": "reserved_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "total_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 5000000000 + } + } + }, + { + "key": { + "symbol": "utilization_rate_bps" + }, + "val": { + "u32": 0 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Pool" + }, + { + "vec": [ + { + "symbol": "EUR" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "available_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 8000000000 + } + } + }, + { + "key": { + "symbol": "created_at" + }, + "val": { + "u64": 0 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "EUR" + } + ] + } + }, + { + "key": { + "symbol": "last_activity_at" + }, + "val": { + "u64": 0 + } + }, + { + "key": { + "symbol": "min_liquidity_threshold" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000 + } + } + }, + { + "key": { + "symbol": "provider_count" + }, + "val": { + "u32": 1 + } + }, + { + "key": { + "symbol": "reserved_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "total_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 8000000000 + } + } + }, + { + "key": { + "symbol": "utilization_rate_bps" + }, + "val": { + "u32": 0 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Pool" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "available_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 10000000000 + } + } + }, + { + "key": { + "symbol": "created_at" + }, + "val": { + "u64": 0 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_activity_at" + }, + "val": { + "u64": 0 + } + }, + { + "key": { + "symbol": "min_liquidity_threshold" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000 + } + } + }, + { + "key": { + "symbol": "provider_count" + }, + "val": { + "u32": 1 + } + }, + { + "key": { + "symbol": "reserved_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "total_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 10000000000 + } + } + }, + { + "key": { + "symbol": "utilization_rate_bps" + }, + "val": { + "u32": 0 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PoolConfig" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "admin" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + }, + { + "key": { + "symbol": "default_lock_period" + }, + "val": { + "u64": 86400 + } + }, + { + "key": { + "symbol": "is_paused" + }, + "val": { + "bool": false + } + }, + { + "key": { + "symbol": "max_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000000 + } + } + }, + { + "key": { + "symbol": "min_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 1000000000 + } + } + }, + { + "key": { + "symbol": "provider_reward_rate_bps" + }, + "val": { + "u32": 50 + } + }, + { + "key": { + "symbol": "utilization_warning_bps" + }, + "val": { + "u32": 8000 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Position" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "EUR" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "accumulated_rewards" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "added_at" + }, + "val": { + "u64": 0 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "EUR" + } + ] + } + }, + { + "key": { + "symbol": "last_modified_at" + }, + "val": { + "u64": 0 + } + }, + { + "key": { + "symbol": "liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 8000000000 + } + } + }, + { + "key": { + "symbol": "lock_until" + }, + "val": { + "u64": 86400 + } + }, + { + "key": { + "symbol": "pool_share_bps" + }, + "val": { + "u32": 10000 + } + }, + { + "key": { + "symbol": "provider" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Position" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "accumulated_rewards" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "added_at" + }, + "val": { + "u64": 0 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_modified_at" + }, + "val": { + "u64": 0 + } + }, + { + "key": { + "symbol": "liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 10000000000 + } + } + }, + { + "key": { + "symbol": "lock_until" + }, + "val": { + "u64": 86400 + } + }, + { + "key": { + "symbol": "pool_share_bps" + }, + "val": { + "u32": 10000 + } + }, + { + "key": { + "symbol": "provider" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Position" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + }, + { + "vec": [ + { + "symbol": "BTC" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "accumulated_rewards" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "added_at" + }, + "val": { + "u64": 0 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "BTC" + } + ] + } + }, + { + "key": { + "symbol": "last_modified_at" + }, + "val": { + "u64": 0 + } + }, + { + "key": { + "symbol": "liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 5000000000 + } + } + }, + { + "key": { + "symbol": "lock_until" + }, + "val": { + "u64": 86400 + } + }, + { + "key": { + "symbol": "pool_share_bps" + }, + "val": { + "u32": 10000 + } + }, + { + "key": { + "symbol": "provider" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PositionCounter" + } + ] + }, + "val": { + "u64": 0 + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/test_snapshots/test_pool_utilization_calculation.1.json b/test_snapshots/test_pool_utilization_calculation.1.json new file mode 100644 index 0000000..b8fd12e --- /dev/null +++ b/test_snapshots/test_pool_utilization_calculation.1.json @@ -0,0 +1,855 @@ +{ + "generators": { + "address": 3, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "initialize_pool_manager", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + }, + { + "i128": { + "hi": 0, + "lo": 1000000000 + } + }, + { + "i128": { + "hi": 0, + "lo": 100000000000 + } + }, + { + "u64": 86400 + }, + { + "u32": 50 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "add_liquidity", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + }, + { + "i128": { + "hi": 0, + "lo": 10000000000 + } + }, + { + "u64": 0 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "add_liquidity", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "EUR" + } + ] + }, + { + "i128": { + "hi": 0, + "lo": 10000000000 + } + }, + { + "u64": 0 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 10, + "timestamp": 1000, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 10, + "min_persistent_entry_ttl": 10, + "min_temp_entry_ttl": 10, + "max_entry_ttl": 3110400, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "ActiveCurrencies" + } + ] + }, + "val": { + "vec": [ + { + "vec": [ + { + "symbol": "USD" + } + ] + }, + { + "vec": [ + { + "symbol": "EUR" + } + ] + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "CurrencyProviders" + }, + { + "vec": [ + { + "symbol": "EUR" + } + ] + } + ] + }, + "val": { + "vec": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "CurrencyProviders" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "vec": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Pool" + }, + { + "vec": [ + { + "symbol": "EUR" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "available_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 14000000000 + } + } + }, + { + "key": { + "symbol": "created_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "EUR" + } + ] + } + }, + { + "key": { + "symbol": "last_activity_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "min_liquidity_threshold" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000 + } + } + }, + { + "key": { + "symbol": "provider_count" + }, + "val": { + "u32": 1 + } + }, + { + "key": { + "symbol": "reserved_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "total_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 10000000000 + } + } + }, + { + "key": { + "symbol": "utilization_rate_bps" + }, + "val": { + "u32": 4294963296 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Pool" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "available_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 5000000000 + } + } + }, + { + "key": { + "symbol": "created_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_activity_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "min_liquidity_threshold" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000 + } + } + }, + { + "key": { + "symbol": "provider_count" + }, + "val": { + "u32": 1 + } + }, + { + "key": { + "symbol": "reserved_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 5000000000 + } + } + }, + { + "key": { + "symbol": "total_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 10000000000 + } + } + }, + { + "key": { + "symbol": "utilization_rate_bps" + }, + "val": { + "u32": 5000 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PoolConfig" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "admin" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + }, + { + "key": { + "symbol": "default_lock_period" + }, + "val": { + "u64": 86400 + } + }, + { + "key": { + "symbol": "is_paused" + }, + "val": { + "bool": false + } + }, + { + "key": { + "symbol": "max_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000000 + } + } + }, + { + "key": { + "symbol": "min_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 1000000000 + } + } + }, + { + "key": { + "symbol": "provider_reward_rate_bps" + }, + "val": { + "u32": 50 + } + }, + { + "key": { + "symbol": "utilization_warning_bps" + }, + "val": { + "u32": 8000 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Position" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "EUR" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "accumulated_rewards" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "added_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "EUR" + } + ] + } + }, + { + "key": { + "symbol": "last_modified_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 10000000000 + } + } + }, + { + "key": { + "symbol": "lock_until" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "pool_share_bps" + }, + "val": { + "u32": 10000 + } + }, + { + "key": { + "symbol": "provider" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Position" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "accumulated_rewards" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "added_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_modified_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 10000000000 + } + } + }, + { + "key": { + "symbol": "lock_until" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "pool_share_bps" + }, + "val": { + "u32": 10000 + } + }, + { + "key": { + "symbol": "provider" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PositionCounter" + } + ] + }, + "val": { + "u64": 0 + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 19 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 19 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/test_snapshots/test_remove_all_liquidity.1.json b/test_snapshots/test_remove_all_liquidity.1.json new file mode 100644 index 0000000..aeff694 --- /dev/null +++ b/test_snapshots/test_remove_all_liquidity.1.json @@ -0,0 +1,514 @@ +{ + "generators": { + "address": 3, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "initialize_pool_manager", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + }, + { + "i128": { + "hi": 0, + "lo": 1000000000 + } + }, + { + "i128": { + "hi": 0, + "lo": 100000000000 + } + }, + { + "u64": 86400 + }, + { + "u32": 50 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "add_liquidity", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + }, + { + "i128": { + "hi": 0, + "lo": 5000000000 + } + }, + { + "u64": 0 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "remove_liquidity", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + }, + { + "i128": { + "hi": 0, + "lo": 5000000000 + } + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 10, + "timestamp": 2000, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 10, + "min_persistent_entry_ttl": 10, + "min_temp_entry_ttl": 10, + "max_entry_ttl": 3110400, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "ActiveCurrencies" + } + ] + }, + "val": { + "vec": [ + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "CurrencyProviders" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "vec": [] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Pool" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "available_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "created_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_activity_at" + }, + "val": { + "u64": 2000 + } + }, + { + "key": { + "symbol": "min_liquidity_threshold" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000 + } + } + }, + { + "key": { + "symbol": "provider_count" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "reserved_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "total_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "utilization_rate_bps" + }, + "val": { + "u32": 0 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PoolConfig" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "admin" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + }, + { + "key": { + "symbol": "default_lock_period" + }, + "val": { + "u64": 86400 + } + }, + { + "key": { + "symbol": "is_paused" + }, + "val": { + "bool": false + } + }, + { + "key": { + "symbol": "max_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000000 + } + } + }, + { + "key": { + "symbol": "min_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 1000000000 + } + } + }, + { + "key": { + "symbol": "provider_reward_rate_bps" + }, + "val": { + "u32": 50 + } + }, + { + "key": { + "symbol": "utilization_warning_bps" + }, + "val": { + "u32": 8000 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PositionCounter" + } + ] + }, + "val": { + "u64": 0 + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 19 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 19 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/test_snapshots/test_remove_liquidity.1.json b/test_snapshots/test_remove_liquidity.1.json new file mode 100644 index 0000000..87b059b --- /dev/null +++ b/test_snapshots/test_remove_liquidity.1.json @@ -0,0 +1,615 @@ +{ + "generators": { + "address": 3, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "initialize_pool_manager", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + }, + { + "i128": { + "hi": 0, + "lo": 1000000000 + } + }, + { + "i128": { + "hi": 0, + "lo": 100000000000 + } + }, + { + "u64": 86400 + }, + { + "u32": 50 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "add_liquidity", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + }, + { + "i128": { + "hi": 0, + "lo": 5000000000 + } + }, + { + "u64": 0 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "remove_liquidity", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + }, + { + "i128": { + "hi": 0, + "lo": 2500000000 + } + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 10, + "timestamp": 2000, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 10, + "min_persistent_entry_ttl": 10, + "min_temp_entry_ttl": 10, + "max_entry_ttl": 3110400, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "ActiveCurrencies" + } + ] + }, + "val": { + "vec": [ + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "CurrencyProviders" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "vec": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Pool" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "available_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 2500000000 + } + } + }, + { + "key": { + "symbol": "created_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_activity_at" + }, + "val": { + "u64": 2000 + } + }, + { + "key": { + "symbol": "min_liquidity_threshold" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000 + } + } + }, + { + "key": { + "symbol": "provider_count" + }, + "val": { + "u32": 1 + } + }, + { + "key": { + "symbol": "reserved_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "total_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 2500000000 + } + } + }, + { + "key": { + "symbol": "utilization_rate_bps" + }, + "val": { + "u32": 0 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PoolConfig" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "admin" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + }, + { + "key": { + "symbol": "default_lock_period" + }, + "val": { + "u64": 86400 + } + }, + { + "key": { + "symbol": "is_paused" + }, + "val": { + "bool": false + } + }, + { + "key": { + "symbol": "max_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000000 + } + } + }, + { + "key": { + "symbol": "min_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 1000000000 + } + } + }, + { + "key": { + "symbol": "provider_reward_rate_bps" + }, + "val": { + "u32": 50 + } + }, + { + "key": { + "symbol": "utilization_warning_bps" + }, + "val": { + "u32": 8000 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Position" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "accumulated_rewards" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "added_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_modified_at" + }, + "val": { + "u64": 2000 + } + }, + { + "key": { + "symbol": "liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 2500000000 + } + } + }, + { + "key": { + "symbol": "lock_until" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "pool_share_bps" + }, + "val": { + "u32": 10000 + } + }, + { + "key": { + "symbol": "provider" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PositionCounter" + } + ] + }, + "val": { + "u64": 0 + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 19 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 19 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/test_snapshots/test_remove_liquidity_while_locked.1.json b/test_snapshots/test_remove_liquidity_while_locked.1.json new file mode 100644 index 0000000..1397dec --- /dev/null +++ b/test_snapshots/test_remove_liquidity_while_locked.1.json @@ -0,0 +1,550 @@ +{ + "generators": { + "address": 3, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "initialize_pool_manager", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + }, + { + "i128": { + "hi": 0, + "lo": 1000000000 + } + }, + { + "i128": { + "hi": 0, + "lo": 100000000000 + } + }, + { + "u64": 86400 + }, + { + "u32": 50 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "add_liquidity", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + }, + { + "i128": { + "hi": 0, + "lo": 5000000000 + } + }, + { + "u64": 86400 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 10, + "timestamp": 1000, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 10, + "min_persistent_entry_ttl": 10, + "min_temp_entry_ttl": 10, + "max_entry_ttl": 3110400, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "ActiveCurrencies" + } + ] + }, + "val": { + "vec": [ + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "CurrencyProviders" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "vec": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Pool" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "available_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 5000000000 + } + } + }, + { + "key": { + "symbol": "created_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_activity_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "min_liquidity_threshold" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000 + } + } + }, + { + "key": { + "symbol": "provider_count" + }, + "val": { + "u32": 1 + } + }, + { + "key": { + "symbol": "reserved_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "total_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 5000000000 + } + } + }, + { + "key": { + "symbol": "utilization_rate_bps" + }, + "val": { + "u32": 0 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PoolConfig" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "admin" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + }, + { + "key": { + "symbol": "default_lock_period" + }, + "val": { + "u64": 86400 + } + }, + { + "key": { + "symbol": "is_paused" + }, + "val": { + "bool": false + } + }, + { + "key": { + "symbol": "max_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000000 + } + } + }, + { + "key": { + "symbol": "min_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 1000000000 + } + } + }, + { + "key": { + "symbol": "provider_reward_rate_bps" + }, + "val": { + "u32": 50 + } + }, + { + "key": { + "symbol": "utilization_warning_bps" + }, + "val": { + "u32": 8000 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Position" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "accumulated_rewards" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "added_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_modified_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 5000000000 + } + } + }, + { + "key": { + "symbol": "lock_until" + }, + "val": { + "u64": 87400 + } + }, + { + "key": { + "symbol": "pool_share_bps" + }, + "val": { + "u32": 10000 + } + }, + { + "key": { + "symbol": "provider" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PositionCounter" + } + ] + }, + "val": { + "u64": 0 + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 19 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 19 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/test_snapshots/test_remove_more_than_available.1.json b/test_snapshots/test_remove_more_than_available.1.json new file mode 100644 index 0000000..820e25c --- /dev/null +++ b/test_snapshots/test_remove_more_than_available.1.json @@ -0,0 +1,550 @@ +{ + "generators": { + "address": 3, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "initialize_pool_manager", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + }, + { + "i128": { + "hi": 0, + "lo": 1000000000 + } + }, + { + "i128": { + "hi": 0, + "lo": 100000000000 + } + }, + { + "u64": 86400 + }, + { + "u32": 50 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "add_liquidity", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + }, + { + "i128": { + "hi": 0, + "lo": 5000000000 + } + }, + { + "u64": 0 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 10, + "timestamp": 2000, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 10, + "min_persistent_entry_ttl": 10, + "min_temp_entry_ttl": 10, + "max_entry_ttl": 3110400, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "ActiveCurrencies" + } + ] + }, + "val": { + "vec": [ + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "CurrencyProviders" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "vec": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Pool" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "available_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 5000000000 + } + } + }, + { + "key": { + "symbol": "created_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_activity_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "min_liquidity_threshold" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000 + } + } + }, + { + "key": { + "symbol": "provider_count" + }, + "val": { + "u32": 1 + } + }, + { + "key": { + "symbol": "reserved_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "total_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 5000000000 + } + } + }, + { + "key": { + "symbol": "utilization_rate_bps" + }, + "val": { + "u32": 0 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PoolConfig" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "admin" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + }, + { + "key": { + "symbol": "default_lock_period" + }, + "val": { + "u64": 86400 + } + }, + { + "key": { + "symbol": "is_paused" + }, + "val": { + "bool": false + } + }, + { + "key": { + "symbol": "max_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000000 + } + } + }, + { + "key": { + "symbol": "min_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 1000000000 + } + } + }, + { + "key": { + "symbol": "provider_reward_rate_bps" + }, + "val": { + "u32": 50 + } + }, + { + "key": { + "symbol": "utilization_warning_bps" + }, + "val": { + "u32": 8000 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Position" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "accumulated_rewards" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "added_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_modified_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 5000000000 + } + } + }, + { + "key": { + "symbol": "lock_until" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "pool_share_bps" + }, + "val": { + "u32": 10000 + } + }, + { + "key": { + "symbol": "provider" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PositionCounter" + } + ] + }, + "val": { + "u64": 0 + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 19 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 19 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/test_snapshots/test_update_pool_balance_on_conversion.1.json b/test_snapshots/test_update_pool_balance_on_conversion.1.json new file mode 100644 index 0000000..d7e223e --- /dev/null +++ b/test_snapshots/test_update_pool_balance_on_conversion.1.json @@ -0,0 +1,952 @@ +{ + "generators": { + "address": 3, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "initialize_pool_manager", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + }, + { + "i128": { + "hi": 0, + "lo": 1000000000 + } + }, + { + "i128": { + "hi": 0, + "lo": 100000000000 + } + }, + { + "u64": 86400 + }, + { + "u32": 50 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "add_liquidity", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + }, + { + "i128": { + "hi": 0, + "lo": 10000000000 + } + }, + { + "u64": 0 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "function_name": "add_liquidity", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "EUR" + } + ] + }, + { + "i128": { + "hi": 0, + "lo": 8000000000 + } + }, + { + "u64": 0 + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 10, + "timestamp": 1000, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 10, + "min_persistent_entry_ttl": 10, + "min_temp_entry_ttl": 10, + "max_entry_ttl": 3110400, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 3110409 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "ActiveCurrencies" + } + ] + }, + "val": { + "vec": [ + { + "vec": [ + { + "symbol": "USD" + } + ] + }, + { + "vec": [ + { + "symbol": "EUR" + } + ] + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "CurrencyProviders" + }, + { + "vec": [ + { + "symbol": "EUR" + } + ] + } + ] + }, + "val": { + "vec": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "CurrencyProviders" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "vec": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Pool" + }, + { + "vec": [ + { + "symbol": "EUR" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "available_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 8850000000 + } + } + }, + { + "key": { + "symbol": "created_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "EUR" + } + ] + } + }, + { + "key": { + "symbol": "last_activity_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "min_liquidity_threshold" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000 + } + } + }, + { + "key": { + "symbol": "provider_count" + }, + "val": { + "u32": 1 + } + }, + { + "key": { + "symbol": "reserved_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "total_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 8000000000 + } + } + }, + { + "key": { + "symbol": "utilization_rate_bps" + }, + "val": { + "u32": 4294966234 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Pool" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "available_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 9000000000 + } + } + }, + { + "key": { + "symbol": "created_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_activity_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "min_liquidity_threshold" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000 + } + } + }, + { + "key": { + "symbol": "provider_count" + }, + "val": { + "u32": 1 + } + }, + { + "key": { + "symbol": "reserved_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 1000000000 + } + } + }, + { + "key": { + "symbol": "total_liquidity" + }, + "val": { + "i128": { + "hi": 0, + "lo": 10000000000 + } + } + }, + { + "key": { + "symbol": "utilization_rate_bps" + }, + "val": { + "u32": 1000 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PoolConfig" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "admin" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + }, + { + "key": { + "symbol": "default_lock_period" + }, + "val": { + "u64": 86400 + } + }, + { + "key": { + "symbol": "is_paused" + }, + "val": { + "bool": false + } + }, + { + "key": { + "symbol": "max_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 100000000000 + } + } + }, + { + "key": { + "symbol": "min_liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 1000000000 + } + } + }, + { + "key": { + "symbol": "provider_reward_rate_bps" + }, + "val": { + "u32": 50 + } + }, + { + "key": { + "symbol": "utilization_warning_bps" + }, + "val": { + "u32": 8000 + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Position" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "EUR" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "accumulated_rewards" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "added_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "EUR" + } + ] + } + }, + { + "key": { + "symbol": "last_modified_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 8000000000 + } + } + }, + { + "key": { + "symbol": "lock_until" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "pool_share_bps" + }, + "val": { + "u32": 10000 + } + }, + { + "key": { + "symbol": "provider" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Position" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "accumulated_rewards" + }, + "val": { + "i128": { + "hi": 0, + "lo": 0 + } + } + }, + { + "key": { + "symbol": "added_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "currency" + }, + "val": { + "vec": [ + { + "symbol": "USD" + } + ] + } + }, + { + "key": { + "symbol": "last_modified_at" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "liquidity_amount" + }, + "val": { + "i128": { + "hi": 0, + "lo": 10000000000 + } + } + }, + { + "key": { + "symbol": "lock_until" + }, + "val": { + "u64": 1000 + } + }, + { + "key": { + "symbol": "pool_share_bps" + }, + "val": { + "u32": 10000 + } + }, + { + "key": { + "symbol": "provider" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "PositionCounter" + } + ] + }, + "val": { + "u64": 0 + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 19 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 19 + ] + ] + ] + }, + "events": [ + { + "event": { + "ext": "v0", + "contract_id": "0000000000000000000000000000000000000000000000000000000000000003", + "type_": "contract", + "body": { + "v0": { + "topics": [ + { + "string": "pool_manager" + } + ], + "data": { + "vec": [ + { + "symbol": "PoolBalanceUpdated" + }, + { + "vec": [ + { + "symbol": "USD" + } + ] + }, + { + "i128": { + "hi": 0, + "lo": 10000000000 + } + }, + { + "i128": { + "hi": 0, + "lo": 9000000000 + } + }, + { + "i128": { + "hi": 0, + "lo": 1000000000 + } + } + ] + } + } + } + }, + "failed_call": false + }, + { + "event": { + "ext": "v0", + "contract_id": "0000000000000000000000000000000000000000000000000000000000000003", + "type_": "contract", + "body": { + "v0": { + "topics": [ + { + "string": "pool_manager" + } + ], + "data": { + "vec": [ + { + "symbol": "PoolBalanceUpdated" + }, + { + "vec": [ + { + "symbol": "EUR" + } + ] + }, + { + "i128": { + "hi": 0, + "lo": 8000000000 + } + }, + { + "i128": { + "hi": 0, + "lo": 8850000000 + } + }, + { + "i128": { + "hi": 0, + "lo": 0 + } + } + ] + } + } + } + }, + "failed_call": false + } + ] +} \ No newline at end of file