Faucet Smart Contract Tutorial | Solidity Tutorial

  Рет қаралды 15,625

Block Explorer

Block Explorer

Күн бұрын

Пікірлер: 51
@riyadhalkhanin8484
@riyadhalkhanin8484 2 жыл бұрын
Thanks, dude! I'm working on my graduation project and you helped me so much
@BlockExplorerMedia
@BlockExplorerMedia 2 жыл бұрын
That's awesome! Glad it was helpful.
@akashsky6100
@akashsky6100 Ай бұрын
Best video for faucet on youtube.
@alexeitarasov1920
@alexeitarasov1920 7 ай бұрын
Super useful videos! Thanks for sharing them with us!
@gooblio
@gooblio Жыл бұрын
I think you might have a reentrancy attack opening on your faucet and all the tokens could be drained from the balance. Maybe not a big deal, because it would only take what you put in???
@BitcoinGenerator-i5y
@BitcoinGenerator-i5y 10 күн бұрын
Binance USDT trades are lighting up the markets 🌟
@jims7089
@jims7089 2 жыл бұрын
Another very informative video! Is there any chance you can create future content that focuses on emit/event/indexed? Also, there was a typo on line 5 of the deploy file so I was expecting an error to be thrown but it worked ok. Was the line skipped?
@BlockExplorerMedia
@BlockExplorerMedia 2 жыл бұрын
I'll add that to my list of videos to make. I think I fixed it off screen since it was a spelling mistake that other people probably didn't make. Good catch! : )
@zakisiddiqui9527
@zakisiddiqui9527 2 жыл бұрын
Thanks for this great and helpful video...I request you to make videos on building DeFi applications pls...thanks again
@BlockExplorerMedia
@BlockExplorerMedia 2 жыл бұрын
I will be doing some DeFi videos soon. Thanks!
@dekonfrost7
@dekonfrost7 9 ай бұрын
You are a smart guy.i wished i could take you to lunch.
@daniel7007
@daniel7007 2 жыл бұрын
Awesome! Could u pls make a video about vault smart contract with some advanced features
@BlockExplorerMedia
@BlockExplorerMedia 2 жыл бұрын
Sure. I was thinking about something like that - a treasury or vault contract. Putting it on my list of videos to make - thanks for the suggestion.
@daniel7007
@daniel7007 2 жыл бұрын
@@BlockExplorerMedia appreciate🙏
@f_ftactics7928
@f_ftactics7928 Жыл бұрын
do you prefer truffle or hardhat? I think you have tutorials for both.
@Imperial_Dynamics
@Imperial_Dynamics 2 жыл бұрын
question please: Is there any difference in Solidity between 10**18 and 1e18 ?
@BlockExplorerMedia
@BlockExplorerMedia 2 жыл бұрын
They are the same.
@baselkelziye4552
@baselkelziye4552 2 жыл бұрын
keep on the great content!
@BlockExplorerMedia
@BlockExplorerMedia 2 жыл бұрын
Thanks!
@adamoc
@adamoc 2 жыл бұрын
Excellent video, thanks 👍🏼
@irakli4797
@irakli4797 2 жыл бұрын
Hey, I have deployed Token contract and Faucet contract on mumbai. When I check my address it's says I have deployed Token contract but Faucet contract is missing. on remix When I paste Faucet contract and code. Functions gives correct outputs, but I cant transfer OCT token to Faucet contract. metamask is failing transactions. any solution
@caochihai
@caochihai Жыл бұрын
thank you so much, it is so helpful for my
@AnkurKumar-g9q
@AnkurKumar-g9q Жыл бұрын
Great content , thanks for sharing
@BitcoinGenerator-i5y
@BitcoinGenerator-i5y 10 күн бұрын
The best crypto transactions always involve USDT 💎
@Shivpratap-g3l
@Shivpratap-g3l 2 ай бұрын
i have 0 ETH in main account , how can I get some SepoliaETH for testing my contract
@lucifer2416
@lucifer2416 2 жыл бұрын
Hi about your previous video about AWS serverless Web application i done all post,get,patch but only delete is showing 502 internal server error what should I do
@lucifer2416
@lucifer2416 2 жыл бұрын
Execution log for request e34860bf-0f0e-456f-abf7-4f83a5b454ad Thu Sep 15 06:14:36 UTC 2022 : Starting execution for request: e34860bf-0f0e-456f-abf7-4f83a5b454ad Thu Sep 15 06:14:36 UTC 2022 : HTTP Method: DELETE, Resource Path: /products/-id Thu Sep 15 06:14:36 UTC 2022 : Method request path: {} Thu Sep 15 06:14:36 UTC 2022 : Method request query string: {} Thu Sep 15 06:14:36 UTC 2022 : Method request headers: {"Content-Type"="application/json"} Thu Sep 15 06:14:36 UTC 2022 : Method request body before transformations: Thu Sep 15 06:14:36 UTC 2022 : Request validation succeeded for content type application/json Thu Sep 15 06:14:36 UTC 2022 : Endpoint request URI: lambda.ap-south-1.amazonaws.com/2015-03-31/functions/arn:aws:lambda:ap-south-1:628942436337:function:hexaldelete/invocations Thu Sep 15 06:14:36 UTC 2022 : Endpoint request headers: {X-Amz-Date=20220915T061436Z, x-amzn-apigateway-api-id=04rn5os185, Accept=application/json, User-Agent=AmazonAPIGateway_04rn5os185, Host=lambda.ap-south-1.amazonaws.com, X-Amz-Content-Sha256=d1633ffa0a94a6f97e61e364580cb4e929d57bb498e3fb2f45e8132a0f9f0f13, X-Amzn-Trace-Id=Root=1-6322c2cc-9e58ffc793b3a4897f4ac801, x-amzn-lambda-integration-tag=e34860bf-0f0e-456f-abf7-4f83a5b454ad, Authorization=**********************************************************************************************************************************************************************************************************************************************************************************************************************************************0fcf9c, X-Amz-Source-Arn=arn:aws:execute-api:ap-south-1:628942436337:04rn5os185/test-invoke-stage/DELETE/products/-id, X-Amz-Security-Token=IQoJb3JpZ2luX2VjEDUaCmFwLXNvdXRoLTEiRzBFAiBNI6sDFnw5zpxwM1PQ0+Y16Ij34Bdypj8j8Tt5ce/zMwIhAInVpklx3FeV6ATpx2LUWU8xLLBqRAHSBRTBCct [TRUNCATED] Thu Sep 15 06:14:36 UTC 2022 : Endpoint request body after transformations: {"resource":"/products/-id","path":"/products/-id","httpMethod":"DELETE","headers":{"\"Content-Type\"":"\"application/json\""},"multiValueHeaders":{"\"Content-Type\"":["\"application/json\""]},"queryStringParameters":null,"multiValueQueryStringParameters":null,"pathParameters":null,"stageVariables":null,"requestContext":{"resourceId":"shm2so","resourcePath":"/products/-id","httpMethod":"DELETE","extendedRequestId":"YfNf9GD7BcwFT4w=","requestTime":"15/Sep/2022:06:14:36 +0000","path":"/products/-id","accountId":"628942436337","protocol":"HTTP/1.1","stage":"test-invoke-stage","domainPrefix":"testPrefix","requestTimeEpoch":1663222476391,"requestId":"e34860bf-0f0e-456f-abf7-4f83a5b454ad","identity":{"cognitoIdentityPoolId":null,"cognitoIdentityId":null,"apiKey":"test-invoke-api-key","principalOrgId":null,"cognitoAuthenticationType":null,"userArn":"arn:aws:iam::628942436337:root","apiKeyId":"test-invoke-api-key-id","userAgent":"aws-internal/3 aws-sdk-java/1.12.239 Linux/ [TRUNCATED] Thu Sep 15 06:14:36 UTC 2022 : Sending request to lambda.ap-south-1.amazonaws.com/2015-03-31/functions/arn:aws:lambda:ap-south-1:628942436337:function:hexaldelete/invocations Thu Sep 15 06:14:36 UTC 2022 : Received response. Status: 200, Integration latency: 40 ms Thu Sep 15 06:14:36 UTC 2022 : Endpoint response headers: {Date=Thu, 15 Sep 2022 06:14:36 GMT, Content-Type=application/json, Content-Length=353, Connection=keep-alive, x-amzn-RequestId=d2d56d25-84ab-4487-b78c-3fdb9b5e60d9, X-Amz-Function-Error=Unhandled, x-amzn-Remapped-Content-Length=0, X-Amz-Executed-Version=$LATEST, X-Amzn-Trace-Id=root=1-6322c2cc-9e58ffc793b3a4897f4ac801;sampled=0} Thu Sep 15 06:14:36 UTC 2022 : Endpoint response body before transformations: {"errorType":"TypeError","errorMessage":"Cannot destructure property 'id' of 'event.pathParameters' as it is null.","trace":["TypeError: Cannot destructure property 'id' of 'event.pathParameters' as it is null."," at Runtime.exports.handler (/var/task/index.js:10:11)"," at Runtime.handleOnceNonStreaming (file:///var/runtime/index.mjs:1028:29)"]} Thu Sep 15 06:14:36 UTC 2022 : Lambda execution failed with status 200 due to customer function error: Cannot destructure property 'id' of 'event.pathParameters' as it is null.. Lambda request id: d2d56d25-84ab-4487-b78c-3fdb9b5e60d9 Thu Sep 15 06:14:36 UTC 2022 : Method completed with status: 502
@lucifer2416
@lucifer2416 2 жыл бұрын
What should I do
@aurobindonayak7128
@aurobindonayak7128 2 жыл бұрын
Iam also facing same problem please solve it!!
@lucifer2416
@lucifer2416 2 жыл бұрын
kzbin.info/www/bejne/rnvZl5adbsmKarc
@lucifer2416
@lucifer2416 2 жыл бұрын
About that video
@adityasingh11156
@adityasingh11156 2 жыл бұрын
​ @Block Explorer What is need of inerface IERC20 here I don't understand, We are niether inheritng it nor implenting their functions transfer and balanceOf ?
@BlockExplorerMedia
@BlockExplorerMedia 2 жыл бұрын
hey Aditya, the reason the interface is needed here is to communicate with other smart contracts. the pattern is to define an interface including the methods being used on the external smart contract and then instantiate a local instance of that contract by passing in the address of that contract (see line ~27 in the constructor - 'token = IERC20(tokenAddress);'). then we can call methods on that remote contract via our local instance such as 'token.transfer' (line 47) and 'token.balanceOf' (line 55). there we are interacting with the remote token smart contract, from our smart contract. does that help clarify?
@BlockExplorerMedia
@BlockExplorerMedia 2 жыл бұрын
Oh and basically the reason it's needed is so that the compiler knows what those methods on the remote contract looks like (input, output, return value, etc) since it has no way of knowing otherwise at compile time.
@adityasingh11156
@adityasingh11156 2 жыл бұрын
@@BlockExplorerMedia Ok Thanks 😊 Now I understand.
@thinkingmad1685
@thinkingmad1685 2 жыл бұрын
@@BlockExplorerMedia hey is this IERC20 interface which is written in this local smart contract different from the openzeppelin one ? or they work same once the token variable is instantiated i m getting confused in that
@PhongTheGiver
@PhongTheGiver 2 жыл бұрын
Thank you....!!!!!
@bestzenyatta3362
@bestzenyatta3362 Жыл бұрын
thanks alot man
@sukiratwarring6219
@sukiratwarring6219 2 жыл бұрын
Interesting!
@BitcoinGenerator-i5y
@BitcoinGenerator-i5y 10 күн бұрын
Flash USDT sender is redefining efficiency in crypto 🌐
@josephdelgiorgio3997
@josephdelgiorgio3997 2 жыл бұрын
or just delete my comment instead of help, that works 2 haha
@josephdelgiorgio3997
@josephdelgiorgio3997 2 жыл бұрын
no worries, I figured it out
@BlockExplorerMedia
@BlockExplorerMedia 2 жыл бұрын
hey Joseph! I only delete spam or offensive comments. Did I miss something? : )
@josephdelgiorgio3997
@josephdelgiorgio3997 2 жыл бұрын
@@BlockExplorerMedia haha its ok! I posted help a comment with an error message that easily could've looked like spam. I appreciate your videos they are very helpful as im teaching myself via KZbin.
@josephdelgiorgio3997
@josephdelgiorgio3997 2 жыл бұрын
*posted a help comment
@BlockExplorerMedia
@BlockExplorerMedia 2 жыл бұрын
Oh sorry about that!! I promise it wasn't intentional. If you ever have a question that doesn't get answered feel free to ping me directly. I try to get to as many as possible! Thanks for your support.
Web3 Tutorial Project | Build a Faucet dApp with Ethersjs & Reactjs
47:22
ERC20 Token Tutorial | Create Your Own Cryptocurrency
1:13:56
Block Explorer
Рет қаралды 142 М.
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 119 МЛН
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 36 МЛН
Миллионер | 3 - серия
36:09
Million Show
Рет қаралды 2,1 МЛН
Why no RONALDO?! 🤔⚽️
00:28
Celine Dept
Рет қаралды 86 МЛН
ERC4626 Vault Smart Contract tutorial | DeFi Vault tutorial
1:05:35
Block Explorer
Рет қаралды 10 М.
How to Become a Blockchain Developer
25:33
Block Explorer
Рет қаралды 56 М.
ERC721 | Solidity 0.8
20:18
Smart Contract Programmer
Рет қаралды 8 М.
Smart Contract Tutorial - Vending Machine Smart Contract in Solidity
34:34
How To Create a Token (Step-by-Step ERC20 Code Explained)
17:20
Whiteboard Crypto
Рет қаралды 138 М.
Create ERC20 token on Ethereum (the EASY way)
22:07
EatTheBlocks
Рет қаралды 105 М.
How To Code Your First Ethereum Smart Contract
19:18
Dapp University
Рет қаралды 183 М.
Smart Contract Tutorial - Create a lottery smart contract in Solidity
45:23
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 119 МЛН