DEV Community

Cover image for EscrowByAgent Smart Contract Module in Bunzz
Bunzz
Bunzz

Posted on

EscrowByAgent Smart Contract Module in Bunzz

We are excited to announce our new EscrowByAgent Module available in Bunzz and created by Yano.

With the Escrow smart contract freelancers can receive payments that are being put on hold until their work is finished and the service beneficiary approves the payment to be released.

This escrow module is intended for a freelancer service operated by agents. The sender deposits money for the recipient and sets agent for the payment. If the sender wants to release the payment, then he can ask the agent to release the payment for the recipient.

Deployer will set the owner fee percent and agent fee percent. The fee percent and cancelLockTime are fixed values.

With the Escrow contract you can create and manage Escrow pool payments. This contract is reviewed, it works on all EVM-chains and it’s available as OSS too.

You can access this Module here.

How to use

  1. Deploy this contract. (Anybody can deploy this contract for an escrow service and make money from this service)

  2. Create an escrow pool with recipient, agent and amount
    a) call depositByETH function to deposit ETH
    b) call deposit function to deposit ERC20 token

_*You can't use the same address for recipient and agent. _

  1. Once you (sender) allow the agent to release the payment (this option is outside of blockchain), the agent will release the payment.
    • call the release function by agent

*ownerFee will be transferred to smart contract owner
*agentFee will be transferred to the agent

  1. Approve to cancel the payment when you want to cancel it.
    • call approveCancel function

*sender, recipient and agent will approve for canceling

  1. Cancel the payment

*call cancel function to cancel the payment

This function works for these cases:
a) recipient and sender accepted.
b) sender accepted and recipient didn't
*needs agreement of agent

Functions

#WRITE

  • release
  • transferOwnership
  • renounceOwnership
  • depositByETH
  • deposit
  • cancel
  • approveCancel

#READ

  • refundStatusList
  • feePercent
  • pools
  • owner
  • poolCount
  • cancelLockTime
  • cancelable
  • agentFeePercent

You can access this Module and the code here.

If you still haven’t signed up to Bunzz, what are you waiting for?

Sign up here and get your smart contracts deployed in 5 minutes through our great GUI.

Top comments (0)