Skip to content

Commit

Permalink
Fix prettier linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rumkin committed Feb 18, 2020
1 parent 3882c95 commit 2c67ce1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
4 changes: 1 addition & 3 deletions lib/evm/interpreter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,7 @@ export default class Interpreter {
* Get info for an opcode from VM's list of opcodes.
*/
lookupOpInfo(op: number): Opcode {
const opcode = this._vm._opcodes[op]
? this._vm._opcodes[op]
: this._vm._opcodes[0xfe]
const opcode = this._vm._opcodes[op] ? this._vm._opcodes[op] : this._vm._opcodes[0xfe]

return opcode
}
Expand Down
18 changes: 9 additions & 9 deletions lib/evm/opcodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export class Opcode {
fee,
isAsync,
}: {
code: number,
name: string,
fullName: string,
fee: number,
isAsync: boolean,
code: number
name: string
fullName: string
fee: number
isAsync: boolean
}) {
this.code = code
this.name = name
Expand Down Expand Up @@ -213,16 +213,16 @@ const istanbulOpcodes: OpcodeList = createOpcodes({
* @param opcodes {Object} Receive basic opcodes info dictionary.
* @returns {OpcodeList} Complete Opcode list
*/
function createOpcodes(
opcodes: {[key:string]: {name: string, fee: number, isAsync: boolean}}
): OpcodeList {
function createOpcodes(opcodes: {
[key: string]: { name: string; fee: number; isAsync: boolean }
}): OpcodeList {
const result: OpcodeList = {}
for (const [key, value] of Object.entries(opcodes)) {
const code = parseInt(key, 10)
result[<any>key] = new Opcode({
code,
fullName: getFullname(code, value.name),
...value
...value,
})
}
return result
Expand Down

0 comments on commit 2c67ce1

Please sign in to comment.