Tuesday, August 25, 2020

Send only once rule in Solidify

 Solidify is the smart contract language, Spectre compliant. This is a contract to send cash once from sender who gives a signsature and a receiver address.  This is done by a trusted miner, and the contract supposedly checked long the way by block chain miners.   When you compile this contract, it is likely some logic interface is exposed telling the trusted miners the proper path of a stable contract.  They can do check sums on the ETH tree.

These are simple contracts, we can guarantee them in the Spectre compatible processor in hand helds. We can chain these and prove stability.  More important, secure smart card is not tied to any currency regime except that the fab center has a security coin protocol.  

There is nothing in Solidify that prevents inter ledger swaps.  Smart card is not limited top cash, it can verify UPS shipping receipts, online order confirmation.  Smart means smart, all the Spectre condition met on the counterfeit proof card.

Solidify is a contract manager for hand held devices, spectre secure.

   


contract Coin {
    // The keyword "public" makes variables
    // accessible from other contracts
    address public minter;
    mapping (address => uint) public balances;

    // Events allow clients to react to specific
    // contract changes you declare
    event Sent (address from, address to, uint amount);

    // Constructor code is only run when the contract
    // is created
    constructor() public {
        minter = msg.sender;
    }

    // Sends an amount of newly created coins to an address
    // Can only be called by the contract creator
    function mint(address receiver, uint amount) public {
        require(msg.sender == minter);
        require(amount < 1e60);
        balances[receiver] += amount;
    }

    // Sends an amount of existing coins
    // from any caller to an address
    function send(address receiver, uint amount) public {
        require(amount <= balances[msg.sender], "Insufficient balance.");
        balances[msg.sender] -= amount;
        balances[receiver] += amount;
        emit Sent (msg.sender, receiver, amount);
    }
}

No comments: