Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLI] Remove defaultGasPrice and 'from' from SendTransaction #390

Merged
merged 15 commits into from
Nov 9, 2018

Conversation

shuffledex
Copy link
Contributor

No description provided.

@shuffledex shuffledex changed the base branch from development-1.5.0 to dev-2.1.0 November 5, 2018 11:46
CLI/commands/common/constants.js Outdated Show resolved Hide resolved
CLI/polymath-cli.js Outdated Show resolved Hide resolved
CLI/commands/common/common_functions.js Show resolved Hide resolved
CLI/commands/common/common_functions.js Outdated Show resolved Hide resolved
CLI/commands/common/common_functions.js Show resolved Hide resolved
@VictorVicente VictorVicente changed the title Remove defaultGasPrice and 'from' from SendTransaction [CLI] Remove defaultGasPrice and 'from' from SendTransaction Nov 5, 2018
@VictorVicente
Copy link
Contributor

@shuffledex I found that scripts commands (whitelist.js, multi_mint.js, accredit.js and changeNonAccreditedLimit.js) fails if they are run from another command. This is because they don't find web3 instance.

@VictorVicente
Copy link
Contributor

gbl.constants.NETWORK doesn't exists anymore.
It should be replaced by a global variable like Issuer or defaultGasPrice at Initialize().
@shuffledex check it and fix it on ST20Generator.js and strMigrator.js

Copy link
Contributor

@VictorVicente VictorVicente left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only one little thing to fix

@@ -362,7 +344,7 @@ async function createDividends(name, dividend, checkpointId) {
createDividendAction = currentDividendsModule.methods.createDividendWithExclusions(maturityTime, expiryTime, excluded, web3.utils.toHex(name));
}
}
let receipt = await common.sendTransaction(Issuer, createDividendAction, defaultGasPrice, web3.utils.toWei(dividend));
let receipt = await common.sendTransaction(createDividendAction, {gasPrice: web3.utils.toWei(dividend)});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be 'value' instead of 'gasPrice'

@VictorVicente VictorVicente merged commit ff804a0 into dev-2.1.0 Nov 9, 2018
@VictorVicente VictorVicente deleted the private/fede/cli/sendTxRefactoring branch November 9, 2018 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants