Here is the design article:
Test accurate tokens for ETH on an ice ice rink through an intelligent UNISWAP contract
As part of my ongoing test process and learning, I wanted to prove how to use the Ethercan platform to test various interactions of intelligent contracts. Today I will use the Uniswap Smart Contract Ice ice rink to replace the link to Weth.
Step 1: Approval of the UNISWAP -SMART contract
First, I had to approve the ice rink through the Uniswap -Smart contract for Ethercan. To this end, I registered on my Ethercan account and navigated the UNISWAP contract. Then I clicked the “Culture” button next to the name of the contract.
After approval of the contract, a transaction was carried out, which properly updated the loan of the contract.
Step 2: Call the exact token of exchange for ETH function
Then I wanted to call the “SwapexActToSforethreth” function from my intelligent UNISWAP contract. This function allows me to exchange a number of tokens (in this case link) for a certain number of other tokens (Weth). I used the following Ethercan transaction:
`Javascript
0x ... Contract ... 0xaabcDdeeffghhijjjjjjjjjjklmmnnooppqqrsttuuvvvvwwvwxxy ...
Here is the division of what each part of the transaction means:
- “Contract”: Address of my ice rink using an intelligent UNISWAP contract
- `0xaabcDdeeffghhijjklmnnooppqqqqrrsttuvvwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww won’t cry” “which I didn’t generate using a bag with cryptographic letters or a tool such as Metamask)
The “SwapexACTOKESFORTHERTH” function is underway three parameters: the number of connection to exchange against Weth, the price of Weth in ETH Pro Link and the date of trade. In this case, I set all three parameters to 1.
Note:
This transaction assumes that you have installed a metamask on your Ethereum account and you are connected to your wallet. If you do not use a metamask, you must install it before starting these transactions.
As soon as I created the transaction, I made sure that I made a tool such as Remix or Truffl to carry them out in the local network environment (because I do not have access to the ether test network on the chain).
I am now waiting for trade processing and that transaction results are available to Ethercan. If everything goes smoothly, my ice rink from the intelligent UNISWAP contract can replace the link to Weth without any problems!