Anchor-Protocol / anchorcli

Command-line interface for Anchor Protocol

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Needs specific explanation for 'distribution-params'

ggomma opened this issue · comments

commented

When I use following command I got an error due to it's invalid option

  • request
    $ anchorcli q overseer distribution-params

  • response
    Error: Request failed with status code 500
    at createError (/Users/ggomma/.nvm/versions/node/v12.15.0/lib/node_modules/@anchor-protocol/anchorcli/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/Users/ggomma/.nvm/versions/node/v12.15.0/lib/node_modules/@anchor-protocol/anchorcli/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/Users/ggomma/.nvm/versions/node/v12.15.0/lib/node_modules/@anchor-protocol/anchorcli/node_modules/axios/lib/adapters/http.js:260:11)
    at IncomingMessage.emit (events.js:228:7)
    at endReadableNT (_stream_readable.js:1185:12)
    at processTicksAndRejections (internal/process/task_queues.js:81:21) {
    config: {
    url: '/wasm/contracts/terra1tmnqgvg567ypvsvk6rwsga3srp7e3lg6u0elp8/store',
    method: 'get',
    headers: { Accept: 'application/json', 'User-Agent': 'axios/0.21.1' },
    params: { query_msg: '{"distribution_params":{}}' },
    baseURL: 'https://lcd.terra.dev',
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    adapter: [Function: httpAdapter],
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    validateStatus: [Function: validateStatus],
    data: undefined
    },
    request: ClientRequest {
    _events: [Object: null prototype] {
    socket: [Function],
    abort: [Function],
    aborted: [Function],
    connect: [Function],
    error: [Function],
    timeout: [Function],
    prefinish: [Function: requestOnPrefinish]
    },
    _eventsCount: 7,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    _last: true,
    chunkedEncoding: false,
    shouldKeepAlive: false,
    useChunkedEncodingByDefault: false,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    _contentLength: 0,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    socket: TLSSocket {
    _tlsOptions: [Object],
    _secureEstablished: true,
    _securePending: false,
    _newSessionPending: false,
    _controlReleased: true,
    _SNICallback: null,
    servername: 'lcd.terra.dev',
    alpnProtocol: false,
    authorized: true,
    authorizationError: null,
    encrypted: true,
    _events: [Object: null prototype],
    _eventsCount: 9,
    connecting: false,
    _hadError: false,
    _parent: null,
    _host: 'lcd.terra.dev',
    _readableState: [ReadableState],
    readable: true,
    _maxListeners: undefined,
    _writableState: [WritableState],
    writable: false,
    allowHalfOpen: false,
    _sockname: null,
    _pendingData: null,
    _pendingEncoding: '',
    server: undefined,
    _server: null,
    ssl: [TLSWrap],
    _requestCert: true,
    _rejectUnauthorized: true,
    parser: null,
    _httpMessage: [Circular],
    [Symbol(res)]: [TLSWrap],
    [Symbol(asyncId)]: 3,
    [Symbol(kHandle)]: [TLSWrap],
    [Symbol(lastWriteQueueSize)]: 0,
    [Symbol(timeout)]: null,
    [Symbol(kBuffer)]: null,
    [Symbol(kBufferCb)]: null,
    [Symbol(kBufferGen)]: null,
    [Symbol(kBytesRead)]: 0,
    [Symbol(kBytesWritten)]: 0,
    [Symbol(connect-options)]: [Object]
    },
    connection: TLSSocket {
    _tlsOptions: [Object],
    _secureEstablished: true,
    _securePending: false,
    _newSessionPending: false,
    _controlReleased: true,
    _SNICallback: null,
    servername: 'lcd.terra.dev',
    alpnProtocol: false,
    authorized: true,
    authorizationError: null,
    encrypted: true,
    _events: [Object: null prototype],
    _eventsCount: 9,
    connecting: false,
    _hadError: false,
    _parent: null,
    _host: 'lcd.terra.dev',
    _readableState: [ReadableState],
    readable: true,
    _maxListeners: undefined,
    _writableState: [WritableState],
    writable: false,
    allowHalfOpen: false,
    _sockname: null,
    _pendingData: null,
    _pendingEncoding: '',
    server: undefined,
    _server: null,
    ssl: [TLSWrap],
    _requestCert: true,
    _rejectUnauthorized: true,
    parser: null,
    _httpMessage: [Circular],
    [Symbol(res)]: [TLSWrap],
    [Symbol(asyncId)]: 3,
    [Symbol(kHandle)]: [TLSWrap],
    [Symbol(lastWriteQueueSize)]: 0,
    [Symbol(timeout)]: null,
    [Symbol(kBuffer)]: null,
    [Symbol(kBufferCb)]: null,
    [Symbol(kBufferGen)]: null,
    [Symbol(kBytesRead)]: 0,
    [Symbol(kBytesWritten)]: 0,
    [Symbol(connect-options)]: [Object]
    },
    _header: 'GET /wasm/contracts/terra1tmnqgvg567ypvsvk6rwsga3srp7e3lg6u0elp8/store?query_msg=%7B%22distribution_params%22:%7B%7D%7D HTTP/1.1\r\n' +
    'Accept: application/json\r\n' +
    'User-Agent: axios/0.21.1\r\n' +
    'Host: lcd.terra.dev\r\n' +
    'Connection: close\r\n' +
    '\r\n',
    _onPendingData: [Function: noopPendingOutput],
    agent: Agent {
    _events: [Object: null prototype],
    _eventsCount: 1,
    _maxListeners: undefined,
    defaultPort: 443,
    protocol: 'https:',
    options: [Object],
    requests: {},
    sockets: [Object],
    freeSockets: {},
    keepAliveMsecs: 1000,
    keepAlive: false,
    maxSockets: Infinity,
    maxFreeSockets: 256,
    maxCachedSessions: 100,
    _sessionCache: [Object]
    },
    socketPath: undefined,
    method: 'GET',
    insecureHTTPParser: undefined,
    path: '/wasm/contracts/terra1tmnqgvg567ypvsvk6rwsga3srp7e3lg6u0elp8/store?query_msg=%7B%22distribution_params%22:%7B%7D%7D',
    _ended: true,
    res: IncomingMessage {
    _readableState: [ReadableState],
    readable: false,
    _events: [Object: null prototype],
    _eventsCount: 3,
    _maxListeners: undefined,
    socket: [TLSSocket],
    connection: [TLSSocket],
    httpVersionMajor: 1,
    httpVersionMinor: 1,
    httpVersion: '1.1',
    complete: true,
    headers: [Object],
    rawHeaders: [Array],
    trailers: {},
    rawTrailers: [],
    aborted: false,
    upgrade: false,
    url: '',
    method: null,
    statusCode: 500,
    statusMessage: 'Internal Server Error',
    client: [TLSSocket],
    _consuming: false,
    _dumped: false,
    req: [Circular],
    responseUrl: 'https://lcd.terra.dev/wasm/contracts/terra1tmnqgvg567ypvsvk6rwsga3srp7e3lg6u0elp8/store?query_msg=%7B%22distribution_params%22:%7B%7D%7D',
    redirects: []
    },
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    _redirectable: Writable {
    _writableState: [WritableState],
    writable: true,
    _events: [Object: null prototype],
    _eventsCount: 2,
    _maxListeners: undefined,
    _options: [Object],
    _ended: true,
    _ending: true,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 0,
    _requestBodyBuffers: [],
    _onNativeResponse: [Function],
    _currentRequest: [Circular],
    _currentUrl: 'https://lcd.terra.dev/wasm/contracts/terra1tmnqgvg567ypvsvk6rwsga3srp7e3lg6u0elp8/store?query_msg=%7B%22distribution_params%22:%7B%7D%7D'
    },
    [Symbol(kNeedDrain)]: false,
    [Symbol(isCorked)]: false,
    [Symbol(kOutHeaders)]: [Object: null prototype] {
    accept: [Array],
    'user-agent': [Array],
    host: [Array]
    }
    },
    response: {
    status: 500,
    statusText: 'Internal Server Error',
    headers: {
    date: 'Wed, 21 Apr 2021 04:16:57 GMT',
    'content-type': 'application/json',
    'content-length': '217',
    connection: 'close',
    'set-cookie': [Array],
    'access-control-allow-origin': '*',
    'access-control-allow-methods': 'GET, POST, OPTIONS',
    'access-control-allow-headers': 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range',
    'access-control-expose-headers': 'Content-Length,Content-Range',
    'cf-cache-status': 'DYNAMIC',
    'cf-request-id': '09943e5125000012d6a0bb0000000001',
    'expect-ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
    server: 'cloudflare',
    'cf-ray': '6433ccc83e1b12d6-ICN'
    },
    config: {
    url: '/wasm/contracts/terra1tmnqgvg567ypvsvk6rwsga3srp7e3lg6u0elp8/store',
    method: 'get',
    headers: [Object],
    params: [Object],
    baseURL: 'https://lcd.terra.dev',
    transformRequest: [Array],
    transformResponse: [Array],
    timeout: 0,
    adapter: [Function: httpAdapter],
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    validateStatus: [Function: validateStatus],
    data: undefined
    },
    request: ClientRequest {
    _events: [Object: null prototype],
    _eventsCount: 7,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    _last: true,
    chunkedEncoding: false,
    shouldKeepAlive: false,
    useChunkedEncodingByDefault: false,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    _contentLength: 0,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    socket: [TLSSocket],
    connection: [TLSSocket],
    _header: 'GET /wasm/contracts/terra1tmnqgvg567ypvsvk6rwsga3srp7e3lg6u0elp8/store?query_msg=%7B%22distribution_params%22:%7B%7D%7D HTTP/1.1\r\n' +
    'Accept: application/json\r\n' +
    'User-Agent: axios/0.21.1\r\n' +
    'Host: lcd.terra.dev\r\n' +
    'Connection: close\r\n' +
    '\r\n',
    _onPendingData: [Function: noopPendingOutput],
    agent: [Agent],
    socketPath: undefined,
    method: 'GET',
    insecureHTTPParser: undefined,
    path: '/wasm/contracts/terra1tmnqgvg567ypvsvk6rwsga3srp7e3lg6u0elp8/store?query_msg=%7B%22distribution_params%22:%7B%7D%7D',
    _ended: true,
    res: [IncomingMessage],
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    _redirectable: [Writable],
    [Symbol(kNeedDrain)]: false,
    [Symbol(isCorked)]: false,
    [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    data: {
    error: 'contract query failed: parsing moneymarket::overseer::QueryMsg: unknown variant distribution_params, expected one of config, epoch_state, whitelist, collaterals, all_collaterals, borrow_limit'
    }
    },
    isAxiosError: true,
    toJSON: [Function: toJSON]
    }

If this error occurs due to lack of anchorcli help text.

@ggomma this query has been removed from the contract level. we will remove this one.

@ggomma The query has been removed from the contract and a new set of queries is added. The new version of anchorcli will be out soon.

commented

Thanks.