User Tools

Site Tools


Sidebar

Welcome to DIDO WIKI

dido:public:s_cli:05_contents:03_prt:08_basic_dido_objects:03_contract:start

This is an old revision of the document!


Contract Class

Return to Basic DIDO Objects

Mostly pulled from Etherscan. Contains the contract data of smart contracts.

See: [https://docs.google.com/spreadsheets/d/1ehCIQxjSZcVLnddDWHBzhPb8h83mHWZxvyX9eckghbU/edit#gid=472774484]]

Figure 1: The Ethereum Contract Class

Id

Return to Top

Primary Key

Description ID
Datatype text
Example ExampleText

Name

Return to Top

Description The contract name
Datatype text
Example OwnedUpgradeabilityProxy

Address

Return to Top

the address is technically the hash of a public key

Description address of the deployed contract.
Datatype text
Example 0x0000000000013949F288172bD7E36837bDdC7211

ABI

Return to Top

Description

The application binary interface of the deployed contract, formatted in JSON. The Contract Application Binary Interface (ABI) is the standard way to interact with contracts in the Ethereum ecosystem, both from outside the blockchain and for contract-to-contract interaction. Data is encoded according to its type, as described in this specification. The encoding is not self-describing and thus requires a schema in order to decode.

Datatype text
Example

[{“constant”:true,“inputs”:[],“name”:“proxyOwner”,“outputs”:[{“name”:“owner”,“type”:“address”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:true,“inputs”:[],“name”:“pendingProxyOwner”,“outputs”:[{“name”:“pendingOwner”,“type”:“address”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:false,“inputs”:[{“name”:“implementation”,“type”:“address”}],“name”:“upgradeTo”,“outputs”:[],“payable”:false,“stateMutability”:“nonpayable”,“type”:“function”},{“constant”:true,“inputs”:[],“name”:“implementation”,“outputs”:[{“name”:“impl”,“type”:“address”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:false,“inputs”:[],“name”:“claimProxyOwnership”,“outputs”:[],“payable”:false,“stateMutability”:“nonpayable”,“type”:“function”},{“constant”:false,“inputs”:[{“name”:“newOwner”,“type”:“address”}],“name”:“transferProxyOwnership”,“outputs”:[],“payable”:false,“stateMutability”:“nonpayable”,“type”:“function”},{“inputs”:[],“payable”:false,“stateMutability”:“nonpayable”,“type”:“constructor”},{“payable”:true,“stateMutability”:“payable”,“type”:“fallback”},{“anonymous”:false,“inputs”:[{“indexed”:true,“name”:“previousOwner”,“type”:“address”},{“indexed”:true,“name”:“newOwner”,“type”:“address”}],“name”:“ProxyOwnershipTransferred”,“type”:“event”},{“anonymous”:false,“inputs”:[{“indexed”:false,“name”:“currentOwner”,“type”:“address”},{“indexed”:false,“name”:“pendingOwner”,“type”:“address”}],“name”:“NewPendingOwner”,“type”:“event”},{“anonymous”:false,“inputs”:[{“indexed”:true,“name”:“implementation”,“type”:“address”}],“name”:“Upgraded”,“type”:“event”}]

Runs

Return to Top

Description Number of optimizing runs of compiler
Datatype numeric
Example 200

Bytecode

Return to Top

Description

The code in Ethereum contracts is written in a low-level, stack-based bytecode language, referred to as EVM6 code. The code consists of a series of bytes, where each byte represents an operation.

Datatype text
Example

0x6080604052600436106100775763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663025313a281146101085780630add8140146101395780633659cfe61461014e5780635c60da1b146101715780639965b3d614610186578063f1739cae1461019b575b60006100816101bc565b9050600160a060020a03811615156100e3576040805160e560020a62461bcd02815260206004820152601f60248201527f696d706c656d656e746174696f6e20636f6e7472616374206e6f742073657400604482015290519081900360640190fd5b60405136600082376000803683855af43d806000843e818015610104578184f35b8184fd5b34801561011457600080fd5b5061011d6101f2565b60408051600160a060020a039092168252519081900360200190f35b34801561014557600080fd5b5061011d610228565b34801561015a57600080fd5b5061016f600160a060020a036004351661025e565b005b34801561017d57600080fd5b5061011d6101bc565b34801561019257600080fd5b5061016f6102dc565b3480156101a757600080fd5b5061016f600160a060020a03600435166103b8565b604080517f747275655553442e70726f78792e696d706c656d656e746174696f6e000000008152905190819003601c0190205490565b604080517f747275655553442e70726f78792e6f776e657200000000000000000000000000815290519081900360130190205490565b604080517f747275655553442e70656e64696e672e70726f78792e6f776e657200000000008152905190819003601b0190205490565b6102666101f2565b600160a060020a031633600160a060020a03161415156102d0576040805160e560020a62461bcd02815260206004820152601060248201527f6f6e6c792050726f7879204f776e657200000000000000000000000000000000604482015290519081900360640190fd5b6102d981610496565b50565b6102e4610228565b600160a060020a031633600160a060020a031614151561034e576040805160e560020a62461bcd02815260206004820152601860248201527f6f6e6c792070656e64696e672050726f7879204f776e65720000000000000000604482015290519081900360640190fd5b610356610228565b600160a060020a03166103676101f2565b600160a060020a03167f5a3e66efaa1e445ebd894728a69d6959842ea1e97bd79b892797106e270efcd960405160405180910390a36103ac6103a7610228565b6104fc565b6103b66000610531565b565b6103c06101f2565b600160a060020a031633600160a060020a031614151561042a576040805160e560020a62461bcd02815260206004820152601060248201527f6f6e6c792050726f7879204f776e657200000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a038116151561043f57600080fd5b61044881610531565b7fb3d55174552271a4f1aaf36b72f50381e892171636b3fb5447fe00e995e7a37b6104716101f2565b60408051600160a060020a03928316815291841660208301528051918290030190a150565b60006104a06101bc565b9050600160a060020a0380821690831614156104bb57600080fd5b6104c482610566565b604051600160a060020a038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a25050565b604080517f747275655553442e70726f78792e6f776e6572000000000000000000000000008152905190819003601301902055565b604080517f747275655553442e70656e64696e672e70726f78792e6f776e657200000000008152905190819003601b01902055565b604080517f747275655553442e70726f78792e696d706c656d656e746174696f6e000000008152905190819003601c019020555600a165627a7a7230582066d4b5932adad66dd7b19bdf5b36c25e9e99e563f06c779eeef9427bb3c9c7670029

Bytecode Hash

Return to Top

Description Hash value of bytecode
Datatype text
Example 0x8987488d191d0070c3de2e6cc1b533c600a513265b1cfb58300fac84d0cc5309

Bytecode lsh

Return to Top

Description Hash value of bytecode
Datatype text
Example 0x1951ceb53e4a24d1fe5bdec0809f797035a7b9e713cc288a0d5c76908ba5dc02d8ca94

Source

Return to Top

Description Complete source code of the contract
Datatype text
Example
pragma solidity ^0.4.23;
// File: openzeppelin-solidity/contracts/ownership/Ownable.sol
/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of ""user permissions"".
 */
contract Ownable
{
  address public owner;
  ...
}

Compiler

Return to Top

Description Compiler for source code compilation
Datatype text
Example v0.4.23+commit.124ca40d

Library

Return to Top

Description Something to do with compilation
Datatype text
Example NULL

Created At

Return to Top

Description Created at timestamp, live on blockchain
Datatype timestamp with time zone
Example 2018-12-18 02:27:44+00

Updated At

Return to Top

on blockchain no updates are possible!

Description Last update timestamp of these values in Anyblock database
Datatype timestamp with time zone
Example 2019-08-19 18:08:31+00

Probability

Return to Top

Currently these are set to 1 for all data that we can retrieve from the blockchain or verify via Etherscan. In case we’re able to find a matching contract in our database by comparing the byte code of a contract or find a similar contract on a different blockchain, this is reflected in the probability. The probabilities are then copied into the Event and Call tables to give an indication of how sure we are this is the right translation.

Description Anyblock custom field
Datatype numeric
Example 1

Optimizations

Return to Top

Description Something to do with compilation
Datatype boolean
Example False

Constructor Args

Return to Top

In case of referencing a contract that would mean the constructor arguments at the time of creation.

Description Constructor arguments
Datatype jasonb
Example

Return to Top

Description An array of weblinks with description and link.
Datatype jasonb
Example
dido/public/s_cli/05_contents/03_prt/08_basic_dido_objects/03_contract/start.1623343782.txt.gz · Last modified: 2021/06/10 12:49 by nick
Translations of this page: