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

(feat) add example Gateway scripts #6106

Merged
merged 2 commits into from Feb 23, 2023
Merged

Conversation

fengtality
Copy link
Sponsor Contributor

Before submitting this PR, please make sure:

  • Your code builds clean without any errors or warnings
  • You are using approved title ("feat/", "fix/", "docs/", "refactor/")

A description of the changes proposed in the pull request:

Initial sample scripts for use by developers using Gateway

Copy link
Contributor

@nikspz nikspz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests performed:

  • Cloned and installed feature branch
  • connected uniswap ethereum goerli
  • started/run amm_price_example script usin WETH-DAI - bot showed raw price without Decimal separator
  • Changed pair manually and started/run price script - reviewed price changed
  • failed to execute tx on uniswap_ethereum_goerli
  • started/run amm_trade_example using WAVAX-USDT on pangolin - reviewed txHash, transaction is successful

Note: trades are not recorded for script in CSV or SQLite, however trades recorded in logs

"""
# swap params
connector_chain_network = "uniswap_ethereum_goerli"
trading_pair = {"WETH-DAI"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's better to just use the string here so later one you don't have to manipulate the variable to get the trading pair

Copy link
Contributor

@cardosofede cardosofede left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but we have to work on the clases, the user is accessing a lot of information that should be encapsulated in the gateway classes

@cardosofede cardosofede merged commit b837d59 into development Feb 23, 2023
@cardosofede cardosofede deleted the feat/gateway-scripts branch February 23, 2023 14:00
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.

None yet

3 participants