-
-
Notifications
You must be signed in to change notification settings - Fork 246
feat/injective gateway #19
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
Conversation
|
PR update:
Hi @vic-en both Steps to reproduce
chrome_lmFYibNxHG.mp4 |
|
@rapcmia The transaction hash and orderId are different. |
|
@vic-en please solve the merging conflicts and the failing tests |
src/templates/root.yml
Outdated
| configurationPath: pancakeswap.yml | ||
| schemaPath: pangolin-schema.json | ||
|
|
||
| $namespace injectiveCLOB: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are trying to set a standard of 1 template file per connector. Can you move the gasLimitEstimate variable from injectiveCLOB into the injective.yml template so that injectiveCLOB can be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i know injective is both a chain and connector in the Gateway architecture, but I think users would prefer to have all the Injective configs in one file, and not two.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| setupFilesAfterEnv: ['<rootDir>/test/setupTests.js'], | ||
| globalSetup: '<rootDir>/test/setup.ts', | ||
| globalTeardown: '<rootDir>/test/teardown.ts', | ||
| moduleNameMapper: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change causes many tests to fail:
Configuration error:
Could not locate module eccrypto mapped as:
/Users/feng/Code/gateway/test/mock/eccrypto-mock.js.
Please check your configuration for these entries:
{
"moduleNameMapper": {
"/eccrypto/": "/Users/feng/Code/gateway/test/mock/eccrypto-mock.js"
},
"resolver": undefined
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
| res.status(200).json({ status: 'ok' }); | ||
| }); | ||
|
|
||
| interface ConnectorsResponse { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems like a cleanup change unrelated to injective?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's not.
It's not needed as well. ConnectorsRoutes.router does the same and is used by the client.
So we removed it.
However, I can undo it if there's a strict requirement.
|
Also, the Injective |
|
@fengtality I addressed all comments. Pls take a look. |
|
@rapcmia I removed review request by mistake. Pls do necessary reviews. Thanks. |
Thanks @vic-en however I think there is something going on with the testnet server and for some reason we cant transfer testnet funds to trading account. Tried new and old wallet still the same even the our curl tests response no txhash atm. Will try later today again |
…nto feat/injective_protocol
rapcmia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- Ran curl endpoint tests
- Port ok
- add wallet ok
- check balances ok
- check poll ok
- post order: ok
- use the script provided in order to get the orderHash used for the orderId on the delete endpoint
- curl -s -X GET -k --key $GATEWAY_KEY --cert $GATEWAY_CERT 'https://localhost:$PORT/clob/orders?chain=injective&network=mainnet&connector=injective&market=INJ-USDT&orderId=0xa508cb32923323679f29a032c70342c147c17d0145625922b0ef22e955c844c0&address=$INJECTIVE_SUBACCOUNTID' | jq
- delete order ok
- transfer to bank ok
- transfer to sub ok
- Check client as well and injector_protocol now showing on
gateway listwhen running on development source client
…nto feat/injective_protocol
…a/gateway into feat/injective_protocol
This reverts commit 26b8e2a.
|
commit eb9a6d6 not sure if that warning message is expected since it's gw PR19: Steps:
|
|
@nikspz this PR does not make any change related to secp256k1. Did you run |
|
@aarmoa I used For both screenshots (PR19 gateway and Development gateway) |
|
@nikspz That message is coming from a dependency introduced by injective sdk. |
This reverts commit 97eb092.
Before submitting this PR, please make sure:
A description of the changes proposed in the pull request:
This is the main branch with injective for gateway. We have added the following routes:
Look at test-helpers/curl/curl.sh for any commands with injective in it. That should cover most of the routes. You must first add a wallet for the injective chain. This can be done with an ethereum private key. Then most routes require the injective public address, not the ethereum public address.
Injective has a bank account and subaccounts. The bank account can hold assets, subaccounts can trade assests. If you want to trade you have to move some tokens from the bank account to the sub accounts. We have two routes to move assets between the accounts.
You should be able to get some testnet assets here: https://testnet.injective.exchange/ and view your bank and sub accounts.
Tests performed by the developer:
Tips for QA testing: