Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- ## 1. contract address
- 1. Every Contract Account has a **unique address** determined when the contract was created.
- 2. The address is derived from the sender address and the transaction nonce (=number of transactions sent from that address)
- 3. Can receive **transactions** and processes them exactly as programmed to govern and advance its account **storage**, **balance**, **event log** and to send **message calls** (="internal transactions") to other accounts.
- ---
- ## 2. binary code
- Every Contract Account is controlled by the **binary code** which resulted from the processed transaction that created it.
- It represents the EVM assembly code that was compiled from a corresponding **contract template**
- ---
- ## 3. value balance
- Every Contract Account has a **value balance** in wei
- * 1 ether is `10**18` wei
- * can be modified by sending transactions that include value
- ---
- ## 4. storage
- Every Contract Account has a persistant non-enumerable key-val-**STORAGE**
- * **`256bit word`** keys => **`256bit word`** values
- * costly to read
- * more costly to initialize or modify
- * can only be read and written to directly by the controlling contract
- ---
- ## 5. memory
- Every Contract Account has a **MEMORY** per "message call"
- * linear and byte adressable
- * width of 256 bits
- * writes either 8bits or 256 bits wide
- * reads or writes expand memory by 256bit words when accesing ountouched memory word
- * expansion costs gas
- * expansion costs scale quadratically
- ---
- ## 6. stack
- Every Contract Account has a **STACK** machine data area
- * max 1024 elements of 256bit words
- * can copy element of top 16 to the top
- * can swap top with any of top 16
- * all other operations take from top and push result on top
- * possible to move stack elements to storage or memory to get deeper access
- ---
- ## 7. event log
- Every Contract Account has an event log.
- * events can not be accessed by contracts after they have been created
- * special indexed data structure mapping all the way up to block level
- * allows efficient access from outside the blockchain (e.g. by Dapps)
- ---
- ## 8. transaction history
- Every Contract Account has a **transaction history** associated with its unique **`"smart" contract account address`**.
- ---
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement