I can keep you through the process of creating an intellectual contract in Reemix, which overcomes the transaction of the album between two complete sepolia ETH on various metamasks.
propose:
- Click Blockchain Ethereum.
- You have Koshelek Sepolia Eth and Metamask Koshalets, set on metabolism.
- You have a swimming pool when stretching the Inteling contract in Remix.
Shag 1: Send a new contract to remix
Shag 2: Delete the disc interface transaction
In contraction with comments, add the interface to the demolition of the platform transactions. You must hurry two functions:
- Atecly
: This feature is paid a payment transaction since September ETH and issues a new payment transaction on the second Koshelke Metamask.
REMEPLY
: This feature will be used for short -liter transaction.
This
Interface of international transaction transaction {
(Recruiter, half, sum): [byte4; 32]
}
Struct sepolipaymentmapcontext {
Recruiter: address;
PauralTsel: address;
Sums: uint64;
}
Pragma Polidy ^0.8.0;
September contract
Mapping (address => mapping (uint64 => address)) private _MaPedtrans;
Functions (address, subjugated payment, removal, shelter address, uint64) public {
// Post -a converted plate transaction
(_MAPPEDTRANSACTIONS [sender] [Summ], _) = _MaPedtransactions [Sender] .Insert (half, sum);
}
Inappropriate function (uint64 sutr) public {
// Take a platelet transaction
Remove _MAPPPERTRANSCARCES [Seereder] [SUMT];
}
}
`
Shag 3: Remove the logic of contracts
In a counterattack with remix, you need to interfere with cartilage logic and memories of disc transaction. You can do this using a loop or recurrence.
This
`
Pragma Polidy ^0.8.0;
Contact Sepoliapaymentmap {
// reduce the payment interface transaction
Interface interface interface of the inter -point transaction transaction;
// initiate mapping massif
Mapping (address => mapping (uint64 => address)) private _MaPedtrans;
// Designer
Function () is painted {
_MaPedtransactions [msg.sender] [0] = msg.sender;
}
// Payment transaction payment function
Functions (address, subjugated payment, removal, shelter address, uint64) public {
// break down,
Requires (_MAPPEDTRANSACTIONS [SUMMARY] [SUMS]! = Address (0), “Carting does not require”);
// Post -a converted plate transaction
_ MAPPEDTRANSACTIONS [Recruiter] [SUMS] = Half;
// Install the powdered plate transaction in the massive
interface._MAPPEDTRANSACTIONS [SENDER] [Summ] = Half;
}
// functioning to recommend a payment transaction map
Inappropriate function (uint64 sutr) public {
// break down,
Requires (_MAPPEDTRANSACTIONS [SUMMARY] [SUMS]! = Address (0), “Carting does not require”);
// Take a platelet transaction
Remove _MAPPPERTRANSCARCES [Seereder] [SUMT];
}
}
`
Shag 4: Skampille and Awash Contract
Contact contact in the remix with the consequence of:
`
Remix -p
`
Ulbaj your counter -blockchain ethereum.