0

firstly I have limited knowledge of solidity but am trying to learn some basics in understanding how a contract works. I have copied a contract that I am playing around with on ropsten test network which all appears to work correctly after I have changed a few bits but my question and concern is that with my limited knowledge is there somewhere in the code that allows the creator of the original code to transfer ownership back to them if I were to deploy on main? If so what would be the most obvious coding that would allow this? The code I have copied is too large to place into the question so I was hoping that somebody may be able to point me in the right direction?

Thank you in advance for any help you may be able to give.

7
  • Contract deployer doesn't have any special privileges, unless you code them in by using setting a role to msg.sender in the contract's constructor. Jun 12 at 9:27
  • Thank you for taking the time to answer. Do you mean the contract creator (the original code writer) ? As I was on the understanding that the deployers address (me) would be the owner of the contract.. Jun 12 at 9:37
  • Yes, that's what I meant. Your account doesn't get any privileges by default unless you code those in. Jun 12 at 9:55
  • So the orginal writer doesn't get privileges unless coded in? And me the deployer of the copied code is the owner and has all the privileges unless otherwise coded by the original writer? I am a bit confused with your answer sorry. Jun 12 at 10:07
  • 1
    No account has any privileges, unless coded in. The EVM doesn't care who wrote the contract or deployed it to the blockchain, not unless you tell it. Jun 12 at 10:11
1

Think of a smart contract as a literal contract.

It is arbitrary and can have whatever you put into the clauses. This analogy will serve you nicely as you develop. For example, a smart contract has no private information, everything is readable by all parties, pretty much as in most contracts.

Moreover, a contract is agreed by all stakeholders. That is also true in Smart contracts, where the stakeholders are the Ethereum Full Nodes that actually run your code. They all agree to what the result is of every computation inside the contract.

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.