How To Build An Escrow Smart Contract With Ethereum & Solidity

preview_player
Показать описание
► SUBSCRIBE TO THIS CHANNEL ◄

JOIN MY FREE TRAINING:

Build Your first blockchain app:

Donate Ether to the channel: 0x39C7BC5496f4eaaa1fF75d88E079C22f0519E7b9

Рекомендации по теме
Комментарии
Автор

Good tutorial for learning parts, but I think if a smart contract acts as an escrow, the agent should not be the person uploading or depositing the funds. The buyer should be depositing the funds into a smart contract. An agent should be there for the dispute phase. In real life, yes you give money to the escrow agent, but in the beginning if we are truly letting the smart contract act as the escrow agent, buyer should send funds directly.

I am only very specific because I must actually make a escrow smart contract, so this helps me understand some parts, but I think I must make it differently.

markw
Автор

Thanks for the tut, Greg. I think a function to cancel the deposit would be essential to include, though. I know, this example is supposed to be simple. However, an escrow agent is valuable if and only if it does give the PAYER their funds back in case something goes wrong

dinub
Автор

Thanks for this amazing tutorials. I have a question regarding your deposit function. In your example the ether payed in the deposit comes only from the agent. But in a real example the payer is generally not the agent. So wouldn't it be more appropriate to remove the onlyAgent modifier from the deposit function? Like this everyone can send ether to a payee and only the agent can then withdraw the ether and give it to the payee.

ilariog
Автор

I think you should be using 3 accounts for the example and not just 2, in order to make clear the escrow is the intermediary, that was just a one to one transaction if I am not mistaken

j
Автор

your coding style is smooth. shows perfection in your craft

ShujathHussain
Автор

I have many sellers and many buyers in my escrow contract. How to write escrow smartcontract with multiple buyers and multiple sellers

jomoljaison
Автор

This tutorial was excellent! Way to go improving what you do, man.

CSMcVay
Автор

Shouldn't there be a "buyer" in addition to the agent and payee? I mean the 1 ether came out of the agent's wallet. It should come out of the buyer's wallet, the agent is just holding it.

_DefiJack
Автор

Hey Gregory, I have a quick question about deploying contract function data through EIP-67 over QR codes. Could you please contact me here.

irishu
Автор

Hi Greg. Thank you for sharing your knowledge. Would you create escrow to hold, say, a 20% developer allowance? Or team allowance for expenses?

HumanBeingPresent
Автор

New to solidity, do we need to have a conditional checking for 0 amount when withdraw() as we will deduct such amount from the mappings? If it is 0, it is like nothing happens, anyway to my understanding gas fee already taken into account no matter the checking. Thanks!

haxpor
Автор

Thoroughly enjoy these smart contract code tutorials!

rattle_
Автор

Hi! Great tutorial. Where can I get the code for this?

rajeevmohan
Автор

That's pretty neat, thanks! But still... why does poor agent pay for all, dude? :)

ИльяИваник-фф
Автор

@Gregory Isn't Escrow account simply form of centralization?

mangola-xu
Автор

Can you create an Escrow contract without having an agent?

magicianx
Автор

This makes no sense.
Why is the ether being sent by the agent? Shouldn't it be sent by the buyer?
Why is the withdraw function sending ether back to whoever deposited? Shouldn't the ether be transferred from buyer to seller?

mayur
Автор

Thanks for sharing.Hi from İstanbul :)

kriptoyatrmcs
Автор

Could you please create a tutorial on mobile dApp?

Hunter-emdr
Автор

Cool, now that I know how to do this, now what??

bu