Back to Home

ShippingEscrow

program
0x50fb8066db65...b534a2edbb59
FrontierContract #6,187Exact Bytecode Match
Deployed January 9, 2016 (10 years ago)Block 821,894

A shipping escrow contract with buyer/seller structs, late delivery penalties, and IPFS cargo documentation.

Key Facts

Deployment Block
821,894
Deployment Date
Jan 9, 2016, 01:22 PM
Code Size
2.5 KB
Gas at Deploy
692,900

Description

A shipping escrow contract deployed during the Frontier era. The contract manages a transaction between a seller and buyer for physical goods shipment. The seller creates the escrow with cargo details (name, description, origin/destination countries, quantity), a penalty rate for late delivery, and an IPFS hash for documentation.

A buyer enters the agreement by calling Agreement() with ETH payment. After a 3-day waiting period (259,200 seconds), the escrowed payment can be released to the seller via ReleasePayment(). The Arrival() function calculates late delivery penalties based on the number of days past the shipped date.

The contract was deployed with test data: seller Dom of Dom Inc., shipping Shoes from China to Germany, with a penalty rate of 15 per day and a maximum of 15 penalty days. The deployer created several sibling escrow contracts on the same day, iterating on the design with different configurations including versions with public getters and a ship() function.

Source Verified

SolidityExact bytecode match(2,531 bytes)
Compiler: soljson

Exact bytecode match (init + runtime). 1955 bytes creation code + 576 bytes constructor args. soljson v0.1.5-v0.1.7 all produce identical output.

Heuristic Analysis

The following characteristics were detected through bytecode analysis and may not be accurate.

Detected Type: program

Frontier Era

The initial release of Ethereum. A bare-bones implementation for technical users.

Block span: 01,149,999
July 30, 2015March 14, 2016

Bytecode Overview

Opcodes2,531
Unique Opcodes175
Jump Instructions80
Storage Operations54

Verified Source Available

Source verified through compiler archaeology and exact bytecode matching.

View Verification Proof
Show source code (Solidity)
contract ShippingEscrow {
    struct Seller {
        bytes32 name;
        bytes32 company;
        bytes32 id;
        address addr;
    }

    struct EscrowData {
        bytes32 cargoName;
        string description;
        uint8 quantity;
        uint penaltyActive;
        uint maxPenaltyDays;
        bytes32 originCountry;
        bytes32 destCountry;
        uint createdAt;
        uint shippedAt;
        uint paymentAmount;
        uint penaltyRate;
        string ipfsHash;
        uint8 isActive;
    }

    struct Buyer {
        bytes32 name;
        bytes32 company;
        bytes32 id;
        address addr;
        bool isPaid;
    }

    Seller seller;
    EscrowData escrowData;
    Buyer buyer;

    event paymentReleased(string message, uint amount);
    event delayedShipment(string message, uint penaltyDays);
    event newAgreement(string message, bytes32 sellerName, bytes32 buyerName);

    function ShippingEscrow(
        bytes32 _sellerName,
        bytes32 _sellerCompany,
        bytes32 _sellerID,
        bytes32 _cargoName,
        string _description,
        uint8 _quantity,
        uint _penaltyActive,
        uint _maxPenaltyDays,
        bytes32 _originCountry,
        bytes32 _destCountry,
        uint _shippedAt,
        uint _penaltyRate,
        string _ipfsHash
    ) {
        seller.name = _sellerName;
        seller.company = _sellerCompany;
        seller.id = _sellerID;
        seller.addr = msg.sender;
        escrowData.cargoName = _cargoName;
        escrowData.description = _description;
        escrowData.quantity = _quantity;
        escrowData.penaltyActive = _penaltyActive;
        escrowData.maxPenaltyDays = _maxPenaltyDays;
        escrowData.originCountry = _originCountry;
        escrowData.destCountry = _destCountry;
        escrowData.shippedAt = _shippedAt;
        escrowData.penaltyRate = _penaltyRate;
        escrowData.ipfsHash = _ipfsHash;
        escrowData.isActive = 0;
    }

    function Escrow() {
        if (buyer.isPaid) throw;
        if (escrowData.createdAt + 259200 >= block.timestamp) {
            ReleasePayment();
        }
    }

    function ReleasePayment() {
        if (buyer.isPaid) throw;
        seller.addr.send(escrowData.paymentAmount);
        buyer.isPaid = true;
        paymentReleased("Payment released!", escrowData.paymentAmount);
    }

    function Arrival() {
        uint timeDiff = block.timestamp - escrowData.shippedAt;
        uint daySeconds = 86400;
        uint numDays = 0;
        if (timeDiff >= daySeconds) {
            numDays = timeDiff / daySeconds;
            uint penalty = numDays * escrowData.penaltyRate;
            delayedShipment("The shipment has arrived late. Delay penalty will be charged.", penalty);
        }
    }

    function Agreement(bytes32 _buyerName, bytes32 _buyerCompany, bytes32 _buyerID) {
        buyer.name = _buyerName;
        buyer.company = _buyerCompany;
        buyer.id = _buyerID;
        buyer.addr = msg.sender;
        escrowData.paymentAmount = msg.value;
        buyer.isPaid = false;
        escrowData.createdAt = block.timestamp;
        escrowData.isActive = 1;
        newAgreement("New Agreement between two Parties!", seller.name, buyer.name);
        Escrow();
    }
}

External Links