gpt4 book ai didi

blockchain - 重新混合 solidity 契约(Contract)如何将多个参数传递到创建按钮

转载 作者:行者123 更新时间:2023-12-04 00:19:33 25 4
gpt4 key购买 nike

我有一个示例代码如下所示:

function HubiiCrowdsale(address _teamMultisig, uint _start, uint _end) Crowdsale(_teamMultisig, _start, _end, hubii_minimum_funding) public {
PricingStrategy p_strategy = new FlatPricing(token_in_wei);
CeilingStrategy c_strategy = new FixedCeiling(chunked_multiple, limit_per_address);
FinalizeAgent f_agent = new BonusFinalizeAgent(this, bonus_base_points, _teamMultisig);
setPricingStrategy(p_strategy);
setCeilingStrategy(c_strategy);
// Testing values
token = new CrowdsaleToken(token_name, token_symbol, token_initial_supply, token_decimals, _teamMultisig, token_mintable);
token.setMintAgent(address(this), true);
token.setMintAgent(address(f_agent), true);
token.setReleaseAgent(address(f_agent));
setFinalizeAgent(f_agent);
}

它只需要我将(address _teamMultisig, uint _start, uint _end)三个参数传递到创建按钮来创建合约,我试过了

"0xca35b7d915458ef540ade6068dfe2f44e8fa733c" 1234 1235

给出错误:

creation of browser/ballot.sol:HubiiCrowdsale errored: Error encoding arguments: SyntaxError: Unexpected number in JSON at position 46

和:

{"_teamMultisig":"0xca35b7d915458ef540ade6068dfe2f44e8fa733c","_start":1234,"_end":1235}

给出错误

creation of browser/ballot.sol:HubiiCrowdsale errored: Error encoding arguments: Error: Argument is not a number

在这里传递参数的正确方法是什么?

最佳答案

尝试:

"0xca35b7d915458ef540ade6068dfe2f44e8fa733c", 1234, 1235

逗号分隔

编辑:我刚刚看到上面的评论,还有一个名为“Crowdsale”的修饰符约束,您能否也提供它的代码,因为这可能会导致更多错误。

关于blockchain - 重新混合 solidity 契约(Contract)如何将多个参数传递到创建按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46345735/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com