5

The simplest way to initialize your contract is to use the interactive commands when creating the contract using openzeppelin create. You will be asked ? Do you want to call a function on the instance after creating it?, choose Yes, then the initialize function and you will be asked to provide the value for each parameter in turn. A simple example contract ...


5

OpenZeppelin uses the "unstructured storage" proxy pattern. See the documentation for details: https://docs.openzeppelin.com/sdk/2.5/pattern OpenZeppelin in the proxy patterns blog post (https://blog.openzeppelin.com/proxy-patterns/) explored three proxy pattern options: Inherited Storage Eternal Storage Unstructured Storage An upgradeable contract ...


5

Their documentation isn't the clearest on this one. https://docs.zeppelinos.org/docs/deploying.html Note that we are using a specific address for the --from option which is different to the default address that ganache-cli would use. This is because we need to use different addresses in order to create upgradeable contracts and to query them. This problem ...


4

Etherscan will recognize your contract once it will log its first Transfer event. This is how it works. Though, even before the first Transfer event was logged, you may view your contract in token tracker: https://rinkeby.etherscan.io/tokens?q=0x5238fFeAEdfc9481bd635B6E0e5eF3b05b19762a


3

TLDR: Only affects variables ZeppelinOS does upgradability by using the proxy pattern, you can actually change the way it behaves, depending on the specific implementation the order of variables may matter, we can preserve data across upgrades etc. In their current default implementation we can simplify the process with this structure: Client -> Proxy ...


2

I suspect that since your proxy has already been initialized via Initializable.sol, the private state variable "initialized" is set to true, hence you cannot call initialize again in this particular proxy instance. If you create a new proxy, linked to a logic contract that has the 3 parameters it should work, but not for a proxy that has already been ...


2

I just faced the same issue. I solved it by adding {from:__non_admin_address__} to my calls, where __non_admin_address__ is address other than admin (deployer). In case of ganache admin address is accounts[0] by default so doing the call with {from:web3.eth.accounts[1]} worked for me. See https://github.com/zeppelinos/zos-lib/issues/226


2

These 4 are really very well-know patters. (1) After analysing Delegatecall-based approach, I give up it because of two main reasons: you can only add new variables not delete or change existing ones. So, if you have a struct defined and you want to change a type or add an existing field, if you want to delete a variable etc.... you cannot. Also, it makes ...


2

You need to send the tokens at least once first. Otherwise this will not work. Etherscan only recognises a contract as an token after its first Transfer event. After sending the tokens once it should work perfectly!


1

It appears that you are having issues with node/npm rather than anything specific to ZeppelinOS. You could delete the token-exchange directory and start the tutorial again. I am not sure why you need to use sudo. If you are not already, you could reinstall npm with a node version manager. https://docs.npmjs.com/resolving-eacces-permissions-errors-when-...


1

I think it'd better to explicit the owner via input param like below, instead of using msg.sender since msg.sender might be not what we intend to set because zos use contract proxy to make it upgradable. pragma solidity ^0.5.0; import "zos-lib/contracts/Initializable.sol"; /** * @title Ownable * @dev The Ownable contract has an owner address, and ...


1

This is just a rough sketch to give you some ideas about partitioning concerns into a simple upgradable structure. First, a very simple Owned contract for transferable access control. Then a Keeper contract that is meant to hold the array during upgrades. This version of Replaceable deploys it's own Keeper to get started. By doing so, Keeper recognizes ...


Only top voted, non community-wiki answers of a minimum length are eligible