Looking at the contract for Wrapped Ether, I noticed that it uses a function called deposit
to wrap ETH.
The function deposit
itself does not get an argument. However, at the top of the script, I noticed event Deposit(address indexed dst, uint wad);
I suppose I have to create this event with the proper arguments (wallet address and how much to be wrapped). I am not sure how to create this event when, I think, I can only interact with functions within the contract.
I am trying to do this in web3.py. I was able to successfully unwrap an existing wETH by calling the withdraw
function in the wETH contract.