大佬,请教一个问题,我创建一个投票,创建成功,但是我切换另外一个账号投票的时候,报错 not authorized to sign this account 这个觉得有点奇怪,不知道什么问题?
我用的是小狐狸 metamask,我切换账号,获取到相应账号了account
下面是相对应的合约代码
function createCampaign(uint minimum, string memory name) public {
address newCampaignAddress = address(new Campaign(minimum, name, msg.sender));
CampaignStruct memory newStruct = CampaignStruct({
campaignName : name,
minimumContribution : minimum,
campaignAddress : newCampaignAddress
});
campaigns.push(newStruct);
}
//投票
function contribute() public payable {
require(msg.value > minimumContribution);
contributors[msg.sender]=true;
contributorsCount++;
}