From cf0e71b4edfe6edbcd49ee76d94cfa7b5360807b Mon Sep 17 00:00:00 2001 From: Andrew B Coathup <28278242+abcoathup@users.noreply.github.com> Date: Tue, 17 Dec 2019 06:15:03 +1100 Subject: [PATCH] Update crowdsales.adoc fix invalid conversion (#2026) Code sample for MyCrowdsaleDeployer causes TypeError: ``` browser/MyCrowdsaleDeployer.sol:21:13: TypeError: Invalid type for argument in function call. Invalid implicit conversion from address to contract IERC20 requested. address(token) // the token ^------------^ ``` Change: ```solidity address(token) // the token ``` To: ```solidity token // the token ``` Reported by community member in the forum: https://forum.openzeppelin.com/t/invalid-implicit-conversion-from-address-to-contract-ierc20-requested/1937 --- docs/modules/ROOT/pages/crowdsales.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/ROOT/pages/crowdsales.adoc b/docs/modules/ROOT/pages/crowdsales.adoc index 868de6da0..8be1b26e6 100644 --- a/docs/modules/ROOT/pages/crowdsales.adoc +++ b/docs/modules/ROOT/pages/crowdsales.adoc @@ -120,7 +120,7 @@ contract MyCrowdsaleDeployer { Crowdsale crowdsale = new MyCrowdsale( 1, // rate, still in TKNbits msg.sender, // send Ether to the deployer - address(token) // the token + token // the token ); // transfer the minter role from this contract (the default) // to the crowdsale, so it can mint tokens