mirror of https://github.com/nucypher/nucypher.git
Rename _totalSupply to _totalSupplyOfTokens to prevent variables shadowing
parent
e9f95bab1b
commit
546fc83b44
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue