 DROP DOMAIN IF EXISTS amount_type CASCADE;
 CREATE DOMAIN amount_type AS NUMERIC(16, 8) CHECK (VALUE < 21000000 AND VALUE >= 0);
 DROP DOMAIN IF EXISTS hash_type CASCADE;
-CREATE DOMAIN hash_type AS VARCHAR(96);  -- 32*3 because "aa 0f ca ..."
+CREATE DOMAIN hash_type AS VARCHAR(95);  -- 32*3 because "aa 0f ca ..."
 DROP DOMAIN IF EXISTS address_type CASCADE;
 CREATE DOMAIN address_type AS VARCHAR(110);
 

    bits_body INT NOT NULL,
    nonce BIGINT NOT NULL,
    when_found TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);

---------------------------------------------------------------------------


CREATE TABLE operations (
    operation_id INT NOT NULL DEFAULT NEXTVAL('operations_script_id_sequence') PRIMARY KEY,
    script_id INT NOT NULL,
    opcode opcode_type NOT NULL,
    data varchar(255)
);

