How use walletconnect for tokens transaction - wallet

I'm using wallet connect for Eth transaction in my app.
but now need transact an ERC-20 token and don't know how do that

It has passed 8 months, but I'll answer.
You need to first approve on the sender side and do the transaction later. WalletConnect only uses Mainnet, so test it using https://test.walletconnect.org/ or first work on the Metamask testnets and apply to Walletconnect

Related

Transfer ERC20 token without ETH

I would like to transfer ERC20 tokens from a wallet who don't own ETH to another wallet who own ETH and who can pay gas fee.
Do you know if it is possible to made a transfer of ERC20 tokens and to let the receiver wallet pay fees ?
TLDR: Not possible, unless the token contract explicitly allows it. Or unless the token holder is also the block producer.
Transaction fees are paid in ETH (or generally, native currency of the network - for example BNB on Binance Smart Chain, MATIC on Polygon, ...). So in most cases, you need to pay ETH to execute either the transfer() function if you want to send the tokens from your address, or the approve() function if you want someone else to transfer tokens from your address.
Very few token contracts implement delegated transfer mechanism on top of the ERC20 standard. There's currently no standardized way to perform a delegated transfer, so each contract might have a different implementation. The token holder uses their private key to sign a predetermined message saying how many tokens they want to transfer to which address. The message also usually contains a nonce or a timestamp to prevent signature replay attack. Token holder passes the message offchain to the transaction sender, and then the transaction sender executes a function of the token contract built specifically for delegated transfers (note that the transaction sender pays the fee to execute this function). The contract validates the signature, and performs the transfer. Again, most token contracts do not implement this mechanism.
One more exception from the rule is a block producer. When you create a new block, you can fill it with transactions not only from the mempool but also with your own transactions. You can build a transaction with 0 gas price, and then include it in the block that you're producing. This way you're also able to send tokens for free.

How to create a USDT wallet from ETH NODE RPC

I am using a ETH full node server (geth) with RPC Server to operate some operations in server side (Generate wallet, send transaction).
I would like to generate USDT wallet for my users but I coud not find any good documentation on this.
Do you know how to create a USDT wallet from ETH NODE RPC ?
There is no such concept as "USDT wallet" - you have made up that yourself.
Any Ethereum address can receive any token.

Exchange ERC20 (Ethereum) with SPL (Solana) via DEX

I've been searching for a while, but I can't seem to find an answer to this so it would be very helpful if someone can clarify this 😣.
Let's say i have TokenA as an ERC20 deployed to the Ethereum mainnet and I have TokenB as an SPL deployed in the Solana Blockchain.
Is there any way of exchanging those 2 Tokens?
I know with Uniswap I can create my own pool and put some liquidity for my Token, and then swap it with the Selected pair. Eg. TokenA/ETH
But in the case above, the 2 tokens are part of different Blockchains..
Thank you very much
The sol wallet will be different from the ERC wallet
You can create smart contract for recieve etherium and one for sol
And by the use of molaris server add watcher for event on the 2 contract when one of them recieve the token and the recieve wallet for the other blockchain run script from the molaris server for transfer token for the address from the other blockchain
Sorry for bad English

Multiple ERC20 tokens in a DeFi platform

I'm building a DeFi application on Ethereum, and I would like to implement the Deposit function. Everything works fine between ETH and a ERC20 token that I built, but I would like to add some tokens like aToken for AAVE or cTokens for Compound that the user will receive after a Deposit call.
So the question is: is it possible to add a function in my smart contract to create multiple tokens without creating a smart contract for each of them? If not, I have to create a different contract for each token I want to add in my app or there is a best method to do it?
Yes this is possible. You can transfer the tokens to the user's address after the Compound Protocol mint operation. This can be made generic using the ERC-20 transfer interface. Be sure to account the amounts users are due and beware of the reentrancy vulnerability.

How can ethereum token use as payment gateway on ecommerce website

Everyone can create ethereum token by solidity codes but don't know how can this token integrate as payment gateway in ecommerce website.
For real project . This token need frontend web wallet /android wallet and integration to every website as payment.
Plz suggest me .how can find this way.
What need more to study.
Token is not a payment gateway. If i understand your question correctly, you are asking, how can you interact with a token that you have created through Solidity from frontend. One use case would be how people can use the token that you have created to purchase some item. For this the users should already be holding the tokens. This can be bought from an ICO or from an exchange. Basically there's a couple of functions in ERC20 token i.e., approve() and transfer() that will approve apps like exchanges to perform transactions on behalf of the owner of the token. Once the users have those tokens they can purchase items from it. Again, you have to write the logic how and what you expect users to do.
ERC20 Token is works likes Currency.And solidity is a programming language. which we used for write the smart contract. if you want to invoke your function then you need to create wallet account ,after that you can do transaction using with web3js. you can get ether for testing purpose from faucet.Basically these are functions in ERC20 token i.e., approve() and transfer() that will perform transactions
I don't suggest using ERC20 tokens as payment method.
Ethereum network is not fast enough,you need 30 confirmations to make sure you received the token, some times the delay can be 1 day
Cost is high, when you transfer token ,usually you have a smart contract, it costs lots of gas
Ether price is not stable, it drops 90% of value from Jan 2018 to Dec 2018. it will be hard for estore to maintain profit.
However if you still want to do that, yes, you can create your own gateway using tokens as your accepted currency.