Coder Social home page Coder Social logo

pursonc / escrow.bos Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eos-nation/escrow.bos

0.0 2.0 0.0 5.26 MB

[BOS:escrow.bos] An escrow contract designed for paying worker proposals.

Home Page: https://bos-test.eosx.io/tools/contract?contractAccount=escrow.bos

License: MIT License

Ruby 1.32% C++ 31.04% CMake 0.28% Makefile 1.87% Assembly 35.15% WebAssembly 30.33% Shell 0.01%

escrow.bos's Introduction

BOS escrow

An escrow contract designed for paying worker proposals. The intention is that the authority for this account would be nulled.

Original source code was gratefully authored by eosDAC.

Caveats

  • The sender of an escrow will temporarily be whitelisted to BOS executives. In the future anyone may be a sender
  • The sender may only have one unfilled escrow at any given time, however they may have many filled escrows
  • To fill an escrow the sender must transfer the BOS tokens to this contract. An unfilled escrow will be filled
  • The receiver is considered as always approving the escrow. An approval must come from either the sender or the auditor
  • The sender may only cancel an escrow that has not been filled
  • The sender may only refund an escrow that has passed it's expiry
  • Unapprove only removes an existing approval, if the action is made before the receiver uses the claim action
  • A sender may extend the expiry but not shorten it
  • The auditor may change extend or shorten the expiry
  • The auditor may close an escrow. This is essentially the same as refunding it, however without waiting for the expiry to lapse
  • The auditor may Lock and Unlock an escrow. This prevents ALL actions except unlock and actions made by the auditor.

init

ACTION: init

PARAMETERS:

  • sender is an eosio account name.
  • receiver is an eosio account name.
  • arb is an eosio account name.
  • expires The date/time after which the escrow amount can be refunded by the sender.
  • memo is a memo to send as the eventual transfer memo at the end of the escrow contract.
  • ext_reference is a reference to to external id held my another contract or entity as opposed to the internal auto-incrementing key.

INTENT: The intent of init is to create an empty escrow payment agreement for safe and secure funds transfer protecting both sender and receiver for a determined amount of time.

Warning: This action will store the content on the chain in the history logs and the data cannot be deleted later so therefore should only store a unidentifiable hash of content rather than human readable content.

transfer

ACTION: transfer

PARAMETERS:

  • from is an eosio account name.
  • to is an eosio account name.
  • quantity is an eosio asset name.
  • memo is a string that provides a memo for the transfer action.

INTENT: The intent of transfer is to listen and react to the eosio.token contract's transfer action and ensure the correct parameters have been included in the transfer action.

Warning: This action will store the content on the chain in the history logs and the data cannot be deleted later.

approve

ACTION: approve

PARAMETERS:

  • key is a unique identifying integer for an escrow entry.
  • approver is an eosio account name.

INTENT: The intent of approve is to approve the release of funds to the intended receiver. Each escrow agreement requires at least 2 approvers and can only be approved by the sender, receiver and/or nominated arbitrator.

Warning: This action will store the content on the chain in the history logs and the data cannot be deleted later.

approveext

ACTION: approveext

PARAMETERS:

  • ext_key is a unique identifying integer for an escrow entry as supplied by an external key source.
  • approver is an eosio account name.

INTENT: The intent of approve is to approve the release of funds to the intended receiver. Each escrow agreement requires at least 2 approvers and can only be approved by the sender, receiver and/or nominated arbitrator.

Warning: This action will store the content on the chain in the history logs and the data cannot be deleted later.

unapprove

ACTION: unapprove

PARAMETERS:

  • key is a unique identifying integer for an escrow entry.
  • disapprover is an eosio account name.

INTENT: The intent of unapprove is to unapprove the release of funds to the intended receiver from a previous approved action. Each escrow agreement requires at least 2 approvers and can only be approved by the sender, receiver and/or nominated arbitrator.

Warning: This action will store the content on the chain in the history logs and the data cannot be deleted later.

unapproveext

ACTION: unapproveext

PARAMETERS:

  • ext_key is a unique identifying integer for an escrow entry as supplied by an external key source.
  • disapprover is an eosio account name.

INTENT: The intent of unapprove is to unapprove the release of funds to the intended receiver from a previous approved action. Each escrow agreement requires at least 2 approvers and can only be approved by the sender, receiver and/or nominated arbitrator.

Warning: This action will store the content on the chain in the history logs and the data cannot be deleted later.

claim

ACTION: claim

PARAMETERS:

  • key is a unique identifying integer for an escrow entry.

INTENT: The intent of claim is to claim the escrowed funds for an intended receiver after an escrow agreement has met the required approvals.

TERM: This action lasts for the duration of the time taken to process the transaction.

claimext

ACTION: claimext

PARAMETERS:

  • ext_key is a unique identifying integer for an escrow entry as supplied by an external key source.

INTENT: The intent of claim is to claim the escrowed funds for an intended receiver after an escrow agreement has met the required approvals.

TERM: This action lasts for the duration of the time taken to process the transaction.

refund

ACTION: refund

PARAMETERS:

  • key is a unique identifying integer for an escrow entry.

INTENT: The intent of refund is to return the escrowed funds back to the original sender. This action can only be run after the contract has met the intended expiry time.

TERM: This action lasts for the duration of the time taken to process the transaction.

refundext

ACTION: refundext

PARAMETERS:

  • ext_key is a unique identifying integer for an escrow entry as supplied by an external key source.

INTENT: The intent of refund is to return the escrowed funds back to the original sender. This action can only be run after the contract has met the intended expiry time.

TERM: This action lasts for the duration of the time taken to process the transaction.

cancel

ACTION: cancel

PARAMETERS:

  • key is a unique identifying integer for an escrow entry.

INTENT: The intent of cancel is to cancel an escrow agreement. This action can only be performed by the sender as long as no funds have already been transferred for the escrow agreement. Otherwise they would need to wait for the expiry time and then use the refund action.

TERM: This action lasts for the duration of the time taken to process the transaction.

cancelext

ACTION: cancelext

PARAMETERS:

  • ext_key is a unique identifying integer for an escrow entry as supplied by an external key source.

INTENT: The intent of cancel is to cancel an escrow agreement. This action can only be performed by the sender as long as no funds have already been transferred for the escrow agreement. Otherwise they would need to wait for the expiry time and then use the refund action.

TERM: This action lasts for the duration of the time taken to process the transaction.

clean

ACTION: clean

INTENT: The intent of clean is remove all existing escrow agreements for developer purposes. This can only be run with _self permission of the contract which would be unavailable on the main net once the contract permissions are removed for the contract account.

TERM: This action lasts for the duration of the time taken to process the transaction.

escrow.bos's People

Contributors

michaeljyeates avatar khazius avatar dallasjohnson avatar deniscarriere avatar

Watchers

James Cloos avatar Purson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.