Skip to content

Commit

Permalink
Migrate txContext to ts
Browse files Browse the repository at this point in the history
  • Loading branch information
s1na committed Apr 18, 2019
1 parent 0f4a9ed commit 6d3df3f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions lib/evm/txContext.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
module.exports = class TxContext {
constructor (gasPrice, origin) {
export default class TxContext {
gasPrice: Buffer
origin: Buffer

constructor (gasPrice: Buffer, origin: Buffer) {
this.gasPrice = gasPrice
this.origin = origin
}
Expand Down
2 changes: 1 addition & 1 deletion lib/runCall.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const ethUtil = require('ethereumjs-util')
const Block = require('ethereumjs-block')
const BN = ethUtil.BN
const { StorageReader } = require('./state')
const TxContext = require('./evm/txContext')
const TxContext = require('./evm/txContext').default
const Message = require('./evm/message')
const Interpreter = require('./evm/interpreter')

Expand Down
2 changes: 1 addition & 1 deletion lib/runCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ item length then you must use utils.pad(<item>, 32) first.
*/
const Block = require('ethereumjs-block')
const Loop = require('./evm/loop')
const TxContext = require('./evm/txContext')
const TxContext = require('./evm/txContext').default
const Interpreter = require('./evm/interpreter')
const { StorageReader } = require('./state')

Expand Down
2 changes: 1 addition & 1 deletion lib/runTx.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const Block = require('ethereumjs-block')
const Account = require('ethereumjs-account').default
const Interpreter = require('./evm/interpreter')
const Message = require('./evm/message')
const TxContext = require('./evm/txContext')
const TxContext = require('./evm/txContext').default
const { StorageReader } = require('./state')
const PStateManager = require('./state/promisified').default

Expand Down

0 comments on commit 6d3df3f

Please sign in to comment.