简体   繁体   English

我试图在 ropsten 中部署带有地址参数的智能合约,但该帐户被投诉无效

[英]I tried to deploy a smart contract with address argument in ropsten, but the account is complained to be invalid

const wallets = [accounts[2],accounts[3]]; const wallets = [accounts[2],accounts[3]]; const shares = [2,1]; const 份额 = [2,1];

return deployer
    .then(() => {
        return deployer.deploy(
            Fund,
            wallets,
            shares
        );
    })

}; };

wallets and shares are arguments of the smart contract in the constructor: wallets 和 share 是构造函数中智能合约的参数:

constructor (address[] memory payees, uint256[] memory shares)构造函数(地址[] 内存收款人,uint256[] 内存份额)

I think it cannot identify the accounts[2],accounts[3], this has no problem in ganache, but it failed in ropsten.我认为它无法识别帐户[2],帐户[3],这在ganache中没有问题,但在ropsten中却失败了。

这在 ropsten 中不受支持,因此在我将它们更改为 address 后,它可以工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法使用 Truffle Infura 将智能合约部署到测试网 (Ropsten) - Unable to deploy smart contract to testnet (Ropsten) using Truffle Infura 通过应用程序访问在Ropsten网络上部署的智能合约 - Access a smart contract that is deployed on the Ropsten network from an App 无法通过 de.net 部署 solana 智能合约 - Not able to deploy solana smart contract over devnet 我尝试在 truffle 中部署我的智能合约,但是当我“truffle 迁移”时显示“不受支持的编译器”,我该如何解决这个问题? - I try to deploy my smart contract in truffle but is says "unsupported compiler" when I "truffle migrate" how can I fix this? 有没有办法在部署之前预先部署从智能合约中部署的库? - Is there a way pre-deploy a library deployed from within a smart contract before it is deployed? eth-brownie:部署的合约作为交易收据而不是合约本身返回。 我无法从地址或别名中获取合同 - eth-brownie: Deployed contract returning as transaction receipt instead of the contract itself. I cannot grab the contract from the address or alias 部署 Firebase 云功能 - 无效的功能服务帐户 - Deploy firebase cloud functions - Invalid function service account 我尝试在 heroku 上部署 NodeJS 应用程序,但无法从外部路由器发出请求 - I tried to deploy a NodeJS app on heroku and I can't make requests from the outside routers 我多次尝试在 Heroku 上部署我的 Express.js 应用程序,但我收到“应用程序错误” - I tried to deploy my Express.js app on Heroku so many times and I get "Application error" 删除Vue组件中的项目,它不起作用((我试图将它部署在heroku上但失败了(( - Delete items in Vue component, it’s not working(( I tried to deploy it on heroku and was failed((
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM