Value not being set up in the constructor was tripping me out throughout half of the video :) I was thinking to myself what kind of magic is this :) amazing video btw!
Great tutorial, i am looking forward to a more advanced version of this application, like adding duration for certain state in case seller or buyer never call the function, we can also add shipping state to the enum and let buyer revoke the transaction before shipping state is initiated, we can even add refund function. Thanks again.
I think is still missing some checks so the game theory works. - The seller should have a maximum time to send the package, so the buyer can abort and get the 2*value back if the seller never sends it. - Also the buyer should have a maximum time to abort or to confirm received, so the seller can get his 2*value back.
I do have another question for you. What would stop someone from using your basic smart contract in this video as his/her own or adding to it and using it as his/her own? I always wonder if people are using these smart contracts, that are created in these RUclips videos, as their own and getting paid using the work of others...
hi Yoshika, great question. there's nothing stopping anyone from using the code. in fact any smart contract code deployed to the blockchain is completely transparent and visible to anyone. so I think people reuse other's code all the time. however one would still probably want to have a good understanding of smart contract development because they would likely need to tweak the existing code in some way to meet their specific requirements and also to make sure the code works and make sure there are no security vulnerabilities. thanks for asking this!
I am trying to implement this safe remote purchase in another scenario. What if the buyer lies that he did not receive the item (but in fact he did receive it), so that he eventually gets the item for free. In my scenario we can not ensure whether he received the item or not. We suppose that there is a function which will return the buyer all of his money back if he does not receive the item. Is there a way we can ensure the truthfulness of the buyer regarding this issue? Thanks in advance.
Can we choose any other function or keyword instead of payable?because when i am converting the abi and bytecode in java ,the converted java code has no option to send or transfer ether,putting value in remix environment and transacting it is easy,but is there any other way if I am using Java for backend?
I think that payseller() function should be called automatically after confirmReceived() and no need to have onlySeller modifier , could please confirm? - thank you
This is good but then buyer would be the one who is gonna pay gas fees for seller's amount withdraw, which may not be good practice so just to separate them to pay their own gas fees.
thank you for this tutorial in this case how seller should know buyers address to send? how we can handle that and keep their address hidden from users without access?
Great tutorial, is this a common method of transaction? If it was a very expensive purchase, eg a car, then adding 2x the value as a deposit might make it too expensive to do, or is there some sort of short term loan thing that people use which still ends up cheaper than the traditional legacy trad-fi type of transactions?
Thanks Lord Melbury! yeah your points are valid and putting up 2x the item price is probably not feasible in a lot of cases. maybe at some point oracles will be able to track shipment data...not sure what other solutions might be out there.
@@BlockExplorerMedia Thanks for your tutorial! What if we set a receiptWindow in the contract? Let's say the receipt window is 14 days. If buyer doesn't confirm receipt of items/request to return items within 14 days, then the contract will automatically send the fund to seller.
I think multi step shipment acts as verifiers of the contract delivery in multiple steps. None of the shipment stage has any direct communication with any other parties and just have the next step to proceed with. At every step, a signed validation is added to the contract delivery, allowing for efficient tracking of all the handshakes that occured at each stage. Now if everything happened properly till the end, and the issue occurs at the final stage, every other step of the chain/delivery loop could be exempted from the issue/fraud and can be settled. Localised issue at that individual bit puts the concern at a limited scope of risk. Also, limited visibility could also help the concern. Timeframes could also be adjusted as per time taken at every stage.
Hi! I attempted to reach out to you via LinkedIn a few days ago. I do want to ask if you have any training courses available aside from RUclips...like through your own website or via Udemy or something of that nature? I really enjoy your teaching style. It's very easy to follow and you take time to explain as you go through your smart contracts. That's exactly what I need and how I learn. Please let me know. Thank you and this video was very helpful. I'm learning a lot from your channel. :)
Hey Yoshika, thanks for the invite - we're connected on Linkedin now. I don't have any courses outside of RUclips yet but it's something I'm planning to do hopefully soon. Thanks for the kind words and I'm so glad you're enjoying the tutorials!
hey Felipe, i think the main reason for keeping them separated is so that the buyer and seller each pay their own gas fees for the transfer of their respective funds.
Great, after a few years in cybersecurity i fell like i want to learn more about blockchain and how this technology works.
Value not being set up in the constructor was tripping me out throughout half of the video :) I was thinking to myself what kind of magic is this :) amazing video btw!
U are the best teacher man. We really appreciate all your work and we hope to see more videos from you.
Great tutorial, i am looking forward to a more advanced version of this application, like adding duration for certain state in case seller or buyer never call the function, we can also add shipping state to the enum and let buyer revoke the transaction before shipping state is initiated, we can even add refund function. Thanks again.
Keep it up with the videos man you are a great teacher!
Thanks - I appreciate that!
I think is still missing some checks so the game theory works.
- The seller should have a maximum time to send the package, so the buyer can abort and get the 2*value back if the seller never sends it.
- Also the buyer should have a maximum time to abort or to confirm received, so the seller can get his 2*value back.
hey Felipe - those are great ideas to improve this contract, thanks for sharing
i think that in any abort case , either from seller or buyer , the return value(2x) should back to the two(buyer an seller)
I do have another question for you. What would stop someone from using your basic smart contract in this video as his/her own or adding to it and using it as his/her own? I always wonder if people are using these smart contracts, that are created in these RUclips videos, as their own and getting paid using the work of others...
hi Yoshika, great question. there's nothing stopping anyone from using the code. in fact any smart contract code deployed to the blockchain is completely transparent and visible to anyone. so I think people reuse other's code all the time. however one would still probably want to have a good understanding of smart contract development because they would likely need to tweak the existing code in some way to meet their specific requirements and also to make sure the code works and make sure there are no security vulnerabilities. thanks for asking this!
@@BlockExplorerMedia, great explanation! I understand better, now. Thank you!
Do you have a full course tutorial I can enroll on...maybe something like udemy or so.
hello it is possible to write a contract to return your tokens back if was accidentally send to a scam address?
Unfortunately it's not possible. There's no way to control the funds in the scam wallet (or any wallet) without knowledge of the wallet's private key.
@@BlockExplorerMedia thanks!
Curious could you add another fucntion that pays a commission fee to the contract?
I am trying to implement this safe remote purchase in another scenario. What if the buyer lies that he did not receive the item (but in fact he did receive it), so that he eventually gets the item for free. In my scenario we can not ensure whether he received the item or not. We suppose that there is a function which will return the buyer all of his money back if he does not receive the item. Is there a way we can ensure the truthfulness of the buyer regarding this issue? Thanks in advance.
u `re the best, man. keep going
Can we choose any other function or keyword instead of payable?because when i am converting the abi and bytecode in java ,the converted java code has no option to send or transfer ether,putting value in remix environment and transacting it is easy,but is there any other way if I am using Java for backend?
I think that payseller() function should be called automatically after confirmReceived() and no need to have onlySeller modifier , could please confirm? - thank you
This is good but then buyer would be the one who is gonna pay gas fees for seller's amount withdraw, which may not be good practice so just to separate them to pay their own gas fees.
thank you for this tutorial
in this case how seller should know buyers address to send?
how we can handle that and keep their address hidden from users without access?
Could do a video in automated testing? Could be using this example!
hey Felipe, I'm afraid automated testing isn't my forte, but I'll add this of my list of things to learn.
Great tutorial, is this a common method of transaction?
If it was a very expensive purchase, eg a car, then adding 2x the value as a deposit might make it too expensive to do, or is there some sort of short term loan thing that people use which still ends up cheaper than the traditional legacy trad-fi type of transactions?
Thanks Lord Melbury! yeah your points are valid and putting up 2x the item price is probably not feasible in a lot of cases. maybe at some point oracles will be able to track shipment data...not sure what other solutions might be out there.
@@BlockExplorerMedia Thanks for your tutorial! What if we set a receiptWindow in the contract? Let's say the receipt window is 14 days. If buyer doesn't confirm receipt of items/request to return items within 14 days, then the contract will automatically send the fund to seller.
I think multi step shipment acts as verifiers of the contract delivery in multiple steps. None of the shipment stage has any direct communication with any other parties and just have the next step to proceed with. At every step, a signed validation is added to the contract delivery, allowing for efficient tracking of all the handshakes that occured at each stage. Now if everything happened properly till the end, and the issue occurs at the final stage, every other step of the chain/delivery loop could be exempted from the issue/fraud and can be settled. Localised issue at that individual bit puts the concern at a limited scope of risk.
Also, limited visibility could also help the concern.
Timeframes could also be adjusted as per time taken at every stage.
Awesome tutorial! It would be cool to do one for a car rental concept based on time parameters.
We will pay you to make one like that happen actually :)
That's a really interesting use case - thanks for sharing BikeChainApp!
Hey can u do a mint NFT solidity contacts been stuck 🥺
adding this to my list of videos to make - thanks
Hi! I attempted to reach out to you via LinkedIn a few days ago. I do want to ask if you have any training courses available aside from RUclips...like through your own website or via Udemy or something of that nature? I really enjoy your teaching style. It's very easy to follow and you take time to explain as you go through your smart contracts. That's exactly what I need and how I learn. Please let me know. Thank you and this video was very helpful. I'm learning a lot from your channel. :)
Hey Yoshika, thanks for the invite - we're connected on Linkedin now. I don't have any courses outside of RUclips yet but it's something I'm planning to do hopefully soon. Thanks for the kind words and I'm so glad you're enjoying the tutorials!
I will also love to be on the list of learners if you start a course.
Interesting. Do you have plans for translations?
Why the confirmedReceived function also doesn't pay the Seller? Why we need another function?
hey Felipe, i think the main reason for keeping them separated is so that the buyer and seller each pay their own gas fees for the transfer of their respective funds.
Thanks for making this video. Would you mind sharing the source code?
github.com/jspruance/block-explorer-tutorials/blob/main/smart-contracts/solidity/SafeRemotePurchase.sol
Very good video (Y)
Thank u very useful
github?
You can find this one here:
github.com/jspruance/block-explorer-tutorials/blob/main/smart-contracts/solidity/SafeRemotePurchase.sol
could I get the source code? please I need the source code.
awesome vid, thank you!
Thanks Robert - glad you liked it!
Yes sir.