Skip to content

Commit

Permalink
improve typings
Browse files Browse the repository at this point in the history
  • Loading branch information
aggre committed Mar 5, 2021
1 parent e883f14 commit 23e70ad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"author": "",
"license": "MPL-2.0",
"dependencies": {
"@devprotocol/khaos-functions": "0.3.2",
"@devprotocol/khaos-functions": "0.3.4",
"@ethersproject/contracts": "5.0.11",
"bent": "^7.3.12",
"ramda": "^0.27.1",
Expand Down
9 changes: 2 additions & 7 deletions src/client/emulate.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import { ethereum } from '../util/endpoint'
import { bent } from '../_lib/_defaultExport'
import { call } from '@devprotocol/khaos-functions'
import { V0Results, PackOptions } from '@devprotocol/khaos-functions'
import { PromiseValue, SetOptional, Merge } from 'type-fest'
import { Event } from '@ethersproject/contracts'

const _pack = call()({
method: 'pack',
options: { results: { status: 0, statusMessage: '', message: '' } },
})

type ArgsWrap = {
readonly args: Record<string, string | number | undefined | null>
}
Expand All @@ -19,7 +14,7 @@ export type KhaosEmulateOptions = {
readonly event: SetOptional<MergedEvent, keyof MergedEvent>
}

export type KhaosEmulateResponse = PromiseValue<typeof _pack>
export type KhaosEmulateResponse = PromiseValue<V0Results<PackOptions>>

export const emulate = (
id: string,
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
jsonwebtoken "^8.5.1"
ramda "^0.27.1"

"@devprotocol/khaos-functions@0.3.2":
version "0.3.2"
resolved "https://registry.yarnpkg.com/@devprotocol/khaos-functions/-/khaos-functions-0.3.2.tgz#8c53bad12769d857a4932b5b2a33e8a5bae9c5e1"
integrity sha512-cPD/TwWGvxRZQgWQeGZsTbyUuq4lh2ngF0JR8G9dh7cYA6QpPu1cCxiTchba6IFyGCjHF/2PSHxnpSXbc0fpgw==
"@devprotocol/khaos-functions@0.3.4":
version "0.3.4"
resolved "https://registry.yarnpkg.com/@devprotocol/khaos-functions/-/khaos-functions-0.3.4.tgz#cfa69a63ae28560483b917e9fd0034957df50c86"
integrity sha512-bzXy27olO51HjqKdVskqxLcbx3albhSLsiD+EvKFfgmzxC1ozelRUXrrVXvgmtXqZSh8UeTjQNKZAezwgj8euw==
dependencies:
"@azure/functions" "1.2.3"
"@devprotocol/khaos-core" "1.2.3"
Expand Down

0 comments on commit 23e70ad

Please sign in to comment.