Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
pr0n00gler committed Oct 8, 2024
1 parent f3c3819 commit a39f88f
Show file tree
Hide file tree
Showing 6 changed files with 814 additions and 826 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"scripts": {
"test": "yarn test:parallel && yarn test:run_in_band",
"test:parallel": "vitest --run src/testcases/parallel --bail 1 --reporter=basic",
"test:run_in_band": "yarn test:feemarket && yarn test:globalfee && yarn test:interchaintx && yarn test:interchain_kv_query && yarn test:interchain_tx_query_plain && yarn test:tokenomics && yarn test:reserve && yarn test:ibc_hooks && yarn test:float && yarn test:parameters && yarn test:slinky && yarn test:chain_manager && yarn test:tokenfactory && yarn test:cron && yarn test:dex_grpc && yarn test:dex_bindings",
"test:run_in_band": "yarn test:feemarket && yarn test:globalfee && yarn test:interchaintx && yarn test:interchain_kv_query && yarn test:interchain_tx_query_plain && yarn test:tokenomics && yarn test:reserve && yarn test:ibc_hooks && yarn test:float && yarn test:parameters && yarn test:connect && yarn test:chain_manager && yarn test:tokenfactory && yarn test:cron && yarn test:dex_grpc && yarn test:dex_bindings",
"test:ibc_transfer": "vitest --run src/testcases/parallel/ibc_transfer --bail 1",
"test:slinky": "vitest --run src/testcases/run_in_band/slinky --bail 1",
"test:connect": "vitest --run src/testcases/run_in_band/connect --bail 1",
"test:cron": "vitest --run src/testcases/run_in_band/cron --bail 1",
"test:grpc_queries": "vitest --run src/testcases/parallel/grpc_queries --bail 1",
"test:interchaintx": "vitest --run src/testcases/run_in_band/interchaintx --bail 1",
Expand Down Expand Up @@ -46,8 +46,8 @@
"@cosmjs/cosmwasm-stargate": "^0.32.4",
"@cosmjs/stargate": "0.32.4",
"@cosmjs/tendermint-rpc": "^0.32.4",
"@neutron-org/neutronjs": "https://github.com/neutron-org/neutronjs.git#7f45328320b53b4fa2b572bc25bb96bf80260181",
"@neutron-org/neutronjsplus": "https://github.com/neutron-org/neutronjsplus.git#39dd19b17165ef206b40018ff437054210c2bdbc",
"@neutron-org/neutronjs": "https://github.com/neutron-org/neutronjs.git#3df8b5e24af6636d2fea441a1785d2f0746ea8be",
"@neutron-org/neutronjsplus": "https://github.com/neutron-org/neutronjsplus.git#22ef73ee2b2ede16c880f5025869aacc20beab44",
"@types/lodash": "^4.14.182",
"axios": "1.6.0",
"commander": "^10.0.0",
Expand Down
6 changes: 3 additions & 3 deletions setup/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ build-hermes:
build-relayer:
cd $(APP_DIR)/neutron-query-relayer/ && make build-docker

build-slinky:
@docker buildx build --load --build-context app=https://github.com/skip-mev/slinky.git#v1.0.0 -t skip-mev/slinky-e2e-oracle -f dockerbuilds/Dockerfile.slinky .
build-connect:
@docker buildx build --load --build-context app=https://github.com/skip-mev/connect.git#v2.1.0 -t skip-mev/connect-e2e-oracle -f dockerbuilds/Dockerfile.connect .

build-all: build-gaia build-neutron build-hermes build-relayer build-slinky
build-all: build-gaia build-neutron build-hermes build-relayer build-connect

start-cosmopark:
@$(COMPOSE) up -d
Expand Down
4 changes: 2 additions & 2 deletions setup/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ services:
- neutron-testing

oracle:
image: skip-mev/slinky-e2e-oracle
image: skip-mev/connect-e2e-oracle
entrypoint: [
"slinky",
"connect",
"--market-map-endpoint", "neutron-node:9090",
]
ports:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM golang:1.22-bullseye AS builder

WORKDIR /src/slinky
WORKDIR /src/connect
COPY --from=app go.mod .

RUN go mod download
Expand All @@ -13,9 +13,9 @@ FROM ubuntu:rolling
EXPOSE 8080
EXPOSE 8002

COPY --from=builder /src/slinky/build/* /usr/local/bin/
COPY --from=builder /src/connect/build/* /usr/local/bin/
RUN apt-get update && apt-get install ca-certificates -y

WORKDIR /usr/local/bin/

ENTRYPOINT ["slinky"]
ENTRYPOINT ["connect"]
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import { Wallet } from '../../helpers/wallet';
import { CONTRACTS } from '../../helpers/constants';
import { NEUTRON_DENOM } from '@neutron-org/neutronjsplus/dist/constants';
import { QueryClientImpl as AdminQueryClient } from '@neutron-org/neutronjs/cosmos/adminmodule/adminmodule/query.rpc.Query';
import { QueryClientImpl as OracleQueryClient } from '@neutron-org/neutronjs/slinky/oracle/v1/query.rpc.Query';
import { QueryClientImpl as OracleQueryClient } from '@neutron-org/neutronjs/connect/oracle/v2/query.rpc.Query';
import { SigningNeutronClient } from '../../helpers/signing_neutron_client';
import config from '../../config.json';

describe('Neutron / Slinky', () => {
describe('Neutron / connect', () => {
let testState: LocalState;
let daoMember1: DaoMember;
let mainDao: Dao;
Expand Down Expand Up @@ -156,7 +156,7 @@ describe('Neutron / Slinky', () => {

test('aave/usd price present', async () => {
const res = await oracleQuery.getPrice({
currencyPair: { base: 'AAVE', quote: 'USD' },
currencyPair: 'AAVE/USD',
});
expect(+res.price.price).toBeGreaterThan(0);
});
Expand Down Expand Up @@ -191,8 +191,8 @@ describe('Neutron / Slinky', () => {
await neutronClient.queryContractSmart(oracleContract, {
get_all_currency_pairs: {},
});
expect(res.currency_pairs[0].Base).toBe('AAVE');
expect(res.currency_pairs[0].Quote).toBe('USD');
expect(res.currency_pairs[0].base).toBe('AAVE');
expect(res.currency_pairs[0].quote).toBe('USD');
});
});
describe('wasmbindings marketmap', () => {
Expand Down Expand Up @@ -265,8 +265,8 @@ export type GetPricesResponse = {
};

export type CurrencyPair = {
Quote: string;
Base: string;
quote: string;
base: string;
};

export type GetAllCurrencyPairsResponse = {
Expand Down
Loading

0 comments on commit a39f88f

Please sign in to comment.