Skip to content

Commit

Permalink
Change default gasPrice to 1e6 (#258)
Browse files Browse the repository at this point in the history
* Change default `gasPrice` to `1e9`

* Change Fee byte_size to 1
  • Loading branch information
nduchak authored Feb 21, 2019
1 parent 03e475a commit d80704d
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 54 deletions.
2 changes: 1 addition & 1 deletion es/ae/contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ const Contract = Ae.compose({
defaults: {
deposit: 0,
vmVersion: 1,
gasPrice: 1000000000, // min gasPrice 1e9
gasPrice: 1000000, // min gasPrice 1e6
amount: 0,
gas: 1600000 - 21000,
options: ''
Expand Down
2 changes: 1 addition & 1 deletion es/tx/builder/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export const FIELD_TYPES = {
// FEE CALCULATION
export const BASE_GAS = 15000
export const GAS_PER_BYTE = 20
export const FEE_BYTE_SIZE = 8
export const FEE_BYTE_SIZE = 1
export const DEFAULT_FEE = 20000

// MAP WITH FEE CALCULATION https://github.com/aeternity/protocol/blob/master/consensus/consensus.md#gas
Expand Down
2 changes: 1 addition & 1 deletion es/tx/tx.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { buildContractId, oracleQueryId } from './builder/helpers'

const ORACLE_VM_VERSION = 0
const CONTRACT_VM_VERSION = 1
const MIN_GAS_PRICE = 1000000000
const MIN_GAS_PRICE = 1000000 // min gasPrice 1e6
// TODO This values using as default for minerva node
const CONTRACT_MINERVA_VM_ABI = 196609
const CONTRACT_MINERVA_VM = 3
Expand Down
70 changes: 20 additions & 50 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/integration/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ contract Identity =
`
let contractId
const deposit = 4
const gasPrice = 1000000000
const gasPrice = 1000000
const gas = 1600000 - 21000 // MAX GAS

let _salt
Expand Down

0 comments on commit d80704d

Please sign in to comment.