GTIN Directory
/contracts/GtinDirectoryInterface.sol

Maksym Petkus, Adrian Haensler

event

EndpointUpdated 80efe7ec

inputs0bytes32gtin
inputs1bytes32new_endpoint_id
event

Registered cf648552

inputs0bytes32gtin
inputs1bytes32company_prefix
inputs2bytes32endpoint_id
event

Transferred e7ad013b

inputs0bytes32gtin
inputs1bytes32new_company_prefix
inputs2bytes32new_endpoint_id
function

acceptTransfer dddd36a5

Accept transfer of GTIN by the destination company

inputs0bytes32_gtin

GTIN-13 of the product to accept

inputs1bytes32_endpoint_id

New company's endpoint identity to assign to the GTIN

inputs2string_previous_endpoint_url

URL of the current GTIN owner company endpoint to be saved as a snapshot. Required here due to limitation of Solidity.

function, constant

get 8eaa6ac0

Get information about GTIN

inputs0bytes32_query_gtin

GTIN-13 of the product

outputs0bytes32_gtin

GTIN-13 of the product

outputs1uint256_owners_count

Total number of the GTIN owners (previous ones and the current)

outputs2bytes32[]_owners_company_prefix

Company prefixes of all the owners, last one is the current

outputs3bytes32_current_endpoint_id

Endpoint identity of the current owner company assigned to the GTIN

function, constant

get 9507d39a

Get information about GTIN by the index

inputs0uint256_index

Index of the GTIN in the Directory

outputs0bytes32_gtin

GTIN-13 of the product

outputs1uint256_owners_count

Total count of the owners in the history of the GTIN

outputs2bytes32[]_owners_company_prefix

GS1 company prefixes of all the owners in the history of GTIN, last is the current owner

outputs3bytes32_current_endpoint_id

Endpoint identity of the current owner company assigned to the GTIN

function, constant

getCount a87d942c

Get number of registered GTINs

outputs0uint256_total_gtins

Total number of GTINs

function, constant

getEndpointId a0e7a720

Retrieve endpoint identity of the current owner company of the GTIN

inputs0bytes32_gtin

GTIN-13 of the product

function, constant

getOwner deb931a2

Retrieve current owner company of the GTIN

inputs0bytes32_gtin

GTIN-13 of the product

outputs0bytes32_owner_company_prefix

GS1 company prefix

function, constant

getPrevEndpointUrl 1302d3f1

Retrieve endpoint snapshot URL of the previous GTIN owner companies

inputs0bytes32_gtin

GTIN-13 of the product

inputs1uint256_owner_index

Index of the ownership (0 - manufacturer)

outputs0string_endpoint_url

Endpoint URL snapshot

function

initTransfer d28bfd76

Initiate GTIN transfer to another company by the GTIN owner

inputs0bytes32_gtin

GTIN-13 of the product to transfer

inputs1bytes32_company_prefix_dest

GS1 company prefix of the destination company

function

register 2f926732

Register product's GTIN

inputs0bytes32_gtin

GTIN-13 of the product, must match company's prefix

inputs1bytes32_endpoint_id

Company's endpoint identity to assign

function

updateEndpointId 23d40774

Set a new endpoint identity to the GTIN

inputs0bytes32_gtin

GTIN-13 of the product

inputs1bytes32_new_endpoint_id

Company's endpoint identity to assign

function

updatePrevEndpointUrl 6d02fcc5

Update endpoint snapshot URL of the previous owner

inputs0bytes32_gtin

GTIN-13 of the product

inputs1uint256_owner_index

Index of the ownership (0 - manufacturer)

inputs2string_endpoint_url

New endpoint URL value