Hello I'm working on a smart contract that does a hotel booking service I want to use my token rather than Wei how can I do that?
Aug 31, 2022, 6:36 PM
I deployed my token in the rinkeby test network
I have few questions about it
this is my code i want to use my token as a payment
In my contract, I use Wei for reserving the hotel I want to use my token
Aug 31, 2022, 6:55 PM
share on pastebin
use IERC20(youtoken).transferFrom(user, price)
Aug 31, 2022, 6:57 PM
(User, address(this), price)*
Aug 31, 2022, 6:58 PM
What is pastebin ?
Aug 31, 2022, 6:58 PM
google it
yep
Aug 31, 2022, 6:59 PM
Ok
Aug 31, 2022, 6:59 PM
btw
use google before asking
https://ethereum.stackexchange.com/questions/103712/how-to-write-a-solidity-function-that-accepts-erc20-tokens-as-payment
https://ethereum.stackexchange.com/questions/103712/how-to-write-a-solidity-function-that-accepts-erc20-tokens-as-payment
first result
Aug 31, 2022, 7:00 PM
I google it but couldn't find my answer
Aug 31, 2022, 7:00 PM
and this what is ?
Aug 31, 2022, 7:00 PM
Yeah see it now ty
Aug 31, 2022, 7:01 PM
not using a contract
lol😂
Aug 31, 2022, 7:02 PM
I'm a new solidity developer can you give me some ideas to train?
Aug 31, 2022, 7:02 PM
I can think of a couple ways but they're sketchy as hell and nobody would touch the tokens lol
Aug 31, 2022, 7:03 PM
what do you mean?
cryptozombies.io
Aug 31, 2022, 7:03 PM
Ty
Aug 31, 2022, 7:03 PM
smart contract enginoor videos (youtube)
Aug 31, 2022, 7:03 PM
Don't want to give anyone any ideas, so I'll just say controller contract and direct modification functions. Not saying it wouldn't be painfully obvious, just possible lol
Aug 31, 2022, 7:04 PM
I am not following you sorry
but the only way to approve someone else using a contract is using the token contract itself
Aug 31, 2022, 7:05 PM
Exactly, so if you fill your token with some sketchy shit that usually only users can control then set owner to a sketchy contract you can use a contract to change the approval directly. Like I said, horrible idea, but possible lol
Aug 31, 2022, 7:06 PM
ah okok
well yep
better to avoid it
better to avoid it
Aug 31, 2022, 7:07 PM
Can someone explain what new do in solidity I read solidity docs but I didn't figure out how it works
Aug 31, 2022, 7:11 PM
what?
Aug 31, 2022, 7:13 PM
Creating smart contract with new
Aug 31, 2022, 7:14 PM
https://ethereum.stackexchange.com/questions/109620/what-is-new-keyword-instentiate-in-solidity-and-how-can-use-it
second result
next question that you find in Top 5 of google you get a warn
Aug 31, 2022, 7:15 PM
I read it but couldn't find out how it works
Aug 31, 2022, 7:16 PM
well
maybe you are missing some basis?
maybe you are missing some basis?
please complete cryptozombies first
Aug 31, 2022, 7:16 PM
Ok
Aug 31, 2022, 7:16 PM
I am sure you didn't
Aug 31, 2022, 7:16 PM
Please Help me find rich old woman looking for sugar baby near me
Aug 31, 2022, 7:17 PM
can't search
my wife is near me
my wife is near me
Aug 31, 2022, 7:17 PM
https://cdn.discordapp.com/attachments/1007710474147745852/1014617748724273162/blockchain.pdf
Aug 31, 2022, 7:30 PM
make Sugar external and use onlyRich modifier
Aug 31, 2022, 7:31 PM