Back to Home

ShippingEscrow2

program
0xbfb62a95d7ad...255b6922e668
FrontierContract #6,213Exact Bytecode Match
Deployed January 9, 2016 (10 years ago)Block 823,067

Identical clone of ShippingEscrow2 (0x47618f). Shipping escrow with public struct getters, deployed by the same developer on the same day.

Key Facts

Deployment Block
823,067
Deployment Date
Jan 9, 2016, 06:50 PM
Code Size
3.3 KB
Gas at Deploy
928,956
Transactions by Year
20162

Description

An identical copy of ShippingEscrow2 (0x47618f0CbA4E98886F169f2bD9E58F39b8f11b45) deployed by the same developer on Jan 9-10, 2016 with different test constructor arguments. The runtime and init bytecode are byte-for-byte identical to the primary contract.

See the primary ShippingEscrow2 contract for full documentation.

Source Verified

SolidityExact bytecode match(3,415 bytes)
Compiler: soljson

Identical runtime and init bytecode to 0x47618f0CbA4E98886F169f2bD9E58F39b8f11b45. Only constructor args differ.

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

Opcodes3,415
Unique Opcodes184
Jump Instructions105
Storage Operations85

Verified Source Available

Source verified through compiler archaeology and exact bytecode matching.

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

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

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

    Seller public seller;
    EscrowData public cargo;
    Buyer public buyer;

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

    function ShippingEscrow2(
        bytes32 _sellerName,
        bytes32 _sellerCompany,
        bytes32 _sellerID,
        bytes32 _cargoName,
        string _description,
        bool _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;
        cargo.cargoName = _cargoName;
        cargo.description = _description;
        cargo.quantity = _quantity;
        cargo.penaltyActive = _penaltyActive;
        cargo.maxPenaltyDays = _maxPenaltyDays;
        cargo.originCountry = _originCountry;
        cargo.destCountry = _destCountry;
        cargo.shippedAt = _shippedAt;
        cargo.penaltyRate = _penaltyRate;
        cargo.ipfsHash = _ipfsHash;
        cargo.isActive = false;
    }

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

    function escrow() {
        if (buyer.isPaid) throw;
        if (cargo.createdAt + 259200 >= block.timestamp) {
            releasePayment();
        }
    }

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

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

External Links