0

How do I call this function from my contract and send ether to it?

abstract contract MainAcceptedOffers {
    function accept(uint _acceptance, address payable _casher) public payable virtual;
}
contract MainOffers {
    MainAcceptedOffers mainAcceptedOffers;
    constructor(address _mainAcceptedOffers) {
        mainAcceptedOffers = MainAcceptedOffers(_mainAcceptedOffers);
    }
    function accept() {
        mainAcceptedOffers.accept(0, msg.sender);
    }
}
0

Try - > mainAcceptedOffers.accept.value("the value in Wei")(0, msg.sender);

The smart contract should have ether

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.