Rename _totalSupply to _totalSupplyOfTokens to prevent variables shadowing

pull/1652/head
vzotova 2019-12-28 17:08:43 +03:00 committed by David Núñez
parent e9f95bab1b
commit 546fc83b44
8 changed files with 10 additions and 10 deletions

View File

@ -416,7 +416,7 @@ class NucypherTokenDeployer(BaseContractDeployer):
self.check_deployment_readiness()
# Order-sensitive!
constructor_kwargs = {"_totalSupply": self.economics.erc20_total_supply}
constructor_kwargs = {"_totalSupplyOfTokens": self.economics.erc20_total_supply}
constructor_kwargs.update(overrides)
constructor_kwargs = {k: v for k, v in constructor_kwargs.items() if v is not None}
contract, deployment_receipt = self.blockchain.deploy_contract(self.deployer_address,

View File

@ -14,10 +14,10 @@ contract NuCypherToken is ERC20, ERC20Detailed('NuCypher', 'NU', 18) {
/**
* @notice Set amount of tokens
* @param _totalSupply Total number of tokens
* @param _totalSupplyOfTokens Total number of tokens
*/
constructor (uint256 _totalSupply) public {
_mint(msg.sender, _totalSupply);
constructor (uint256 _totalSupplyOfTokens) public {
_mint(msg.sender, _totalSupplyOfTokens);
}
/**

View File

@ -31,7 +31,7 @@ TOTAL_SUPPLY = 2 * 10 ** 36
@pytest.fixture()
def token(testerchain, deploy_contract):
# Create an ERC20 token
token, _ = deploy_contract('NuCypherToken', _totalSupply=TOTAL_SUPPLY)
token, _ = deploy_contract('NuCypherToken', _totalSupplyOfTokens=TOTAL_SUPPLY)
return token

View File

@ -63,7 +63,7 @@ def token_economics():
@pytest.fixture()
def token(token_economics, deploy_contract):
# Create an ERC20 token
contract, _ = deploy_contract('NuCypherToken', _totalSupply=token_economics.erc20_total_supply)
contract, _ = deploy_contract('NuCypherToken', _totalSupplyOfTokens=token_economics.erc20_total_supply)
return contract

View File

@ -26,7 +26,7 @@ from nucypher.blockchain.eth.token import NU
@pytest.fixture()
def token(testerchain, deploy_contract):
# Create an ERC20 token
token, _ = deploy_contract('NuCypherToken', _totalSupply=int(NU(2 * 10 ** 9, 'NuNit')))
token, _ = deploy_contract('NuCypherToken', _totalSupplyOfTokens=int(NU(2 * 10 ** 9, 'NuNit')))
return token

View File

@ -44,7 +44,7 @@ def token_economics():
@pytest.fixture()
def token(deploy_contract, token_economics):
# Create an ERC20 token
token, _ = deploy_contract('NuCypherToken', _totalSupply=token_economics.erc20_total_supply)
token, _ = deploy_contract('NuCypherToken', _totalSupplyOfTokens=token_economics.erc20_total_supply)
return token

View File

@ -22,7 +22,7 @@ from eth_utils import to_wei
@pytest.fixture()
def token(testerchain, token_economics, deploy_contract):
contract, _ = deploy_contract('NuCypherToken', _totalSupply=token_economics.erc20_total_supply)
contract, _ = deploy_contract('NuCypherToken', _totalSupplyOfTokens=token_economics.erc20_total_supply)
return contract

View File

@ -44,7 +44,7 @@ def token_economics():
@pytest.fixture()
def token(token_economics, deploy_contract):
# Create an ERC20 token
contract, _ = deploy_contract('NuCypherToken', _totalSupply=token_economics.erc20_total_supply)
contract, _ = deploy_contract('NuCypherToken', _totalSupplyOfTokens=token_economics.erc20_total_supply)
return contract