2

While going through solidity documentation I came across a term 'the owning contract' which i didnt understand.

A contract in the sense of Solidity is a collection of code (its functions) and data (its state) that resides at a specific address on the Ethereum blockchain. The line uint storedData; declares a state variable called storedData of type uint (unsigned integer of 256 bits). You can think of it as a single slot in a database that can be queried and altered by calling functions of the code that manages the database. In the case of Ethereum, this is always the owning contract. And in this case, the functions set and get can be used to modify or retrieve the value of the variable.

2

By 'the owning contract' they mean the contract that owns the aforementioned 'single slot in a database', which in their example is the storedData variable.

Contract code can only modify the state variables of the contract it's running in.

| improve this answer | |
1

The owning contract has the right to modify the code. Ether are mined and used to compile the contract. An address is then produced (representing the contract) that sits in the blockchain.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.