sorry to bother, trying to get an acknowledgment that my sender(msg.sender) address is sending to the receive() external payable. compiles fine, doesn't deploy correctly to show +1ETH in recipient wallet. How do I code that.
contract WagerAgreement { uint public value; address payable public Instigator; address payable public Rider;
enum State { Created, Sign, Locked, Release }
State state;
constructor () payable isInstigator {
Instigator = payable(msg.sender);
value = msg.value;
}
receive() external payable{
Instigator = payable(msg.sender);
Rider = payable(msg.sender);
}
Example of function:
function WagerSent () external isInstigator inState(State.Created) payable {
Instigator = payable(msg.sender);
Rider = payable(msg.sender);
state = State.Created;
}
// received and acknowledged by 'Rider' by showing a response - possibly by a boolean.
function RiderAccepts () external isRider inState(State.Sign) payable {
Rider = payable(msg.sender);
state = State.Sign;
How do I make sure that the Rider is receiving the value in their specific wallet? How do I import their wallet address? Is it possible to make it a variable to the Rider and not a constant?
Thank you.