Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added testpoolswap rpc method and python rpc test #87

Merged
merged 1 commit into from
Nov 2, 2020

Conversation

DeFiDev
Copy link
Contributor

@DeFiDev DeFiDev commented Nov 2, 2020

Added RPC method testpoolswap:

testpoolswap ( {"from":"str","tokenFrom":"str","amountFrom":n,"to":"str","tokenTo":"str","maxPrice":n} )

Tests a poolswap transaction with given metadata and returns poolswap result.

Arguments:
1. metadata                   (json object)
     {
       "from": "str",         (string, required) Address of the owner of tokenA.
       "tokenFrom": "str",    (string, required) One of the keys may be specified (id/symbol)
       "amountFrom": n,       (numeric, required) tokenFrom coins amount
       "to": "str",           (string, required) Address of the owner of tokenB.
       "tokenTo": "str",      (string, required) One of the keys may be specified (id/symbol)
       "maxPrice": n,         (numeric) Maximum acceptable price
     }

Result:
"amount@tokenId"    (string) The string with amount result of poolswap in format AMOUNT@TOKENID.

Throws RPC exception if input params were not valid.

@monstrobishi monstrobishi merged commit 5ebc1a1 into v1.3.x Nov 2, 2020
@monstrobishi monstrobishi deleted the getting-poolswap-result branch November 2, 2020 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants