12 votes

How to get implementation address after deployProxy()? (@open-zepplin/hardhat-upgrades)

You can also use the hardhat upgrades plugin for the same effect as the accepted answer: import { ethers, upgrades } from "hardhat"; const currentImplAddress = await upgrades.erc1967....
stevyhacker's user avatar
7 votes
Accepted

How to get implementation address after deployProxy()? (@open-zepplin/hardhat-upgrades)

Try the below, import { getImplementationAddress } from '@openzeppelin/upgrades-core'; const currentImplAddress = await getImplementationAddress(provider, proxyAddress);
Keerthana Ramalingam's user avatar
5 votes
Accepted

ERC20 not recognized by TokenTracker

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 ...
Mikhail Vladimirov's user avatar
5 votes
Accepted

couldnt understand implementaion of UpgradeabilityProxyFactory

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 ...
abcoathup's user avatar
  • 1,338
5 votes

Pros and Cons of smart contract upgradable patterns

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....
abcoathup's user avatar
  • 1,338
5 votes

Zeppelin OS: revert Cannot call fallback function from the proxy admin

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 ...
Dmitri DB's user avatar
  • 151
4 votes
Accepted

Does function order also matter when writing upgradeable smart contracts?

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 ...
Enrique Alcazar's user avatar
2 votes
Accepted

ZepplinOS: Where to set owner of the contract?

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 ...
Tony Dang's user avatar
  • 2,151
2 votes
Accepted

Cannot convert undefined or null to object after compile

I can compile using solc 0.7.5 and npx oz compile. token.sol : //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.7.5; import "@openzeppelin/contracts/access/Ownable.sol"; import &...
clement's user avatar
  • 4,302
2 votes
Accepted

zeppelinOS add parameter to initialize()

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 ...
Alejandro Santander's user avatar
2 votes

Zeppelin OS: revert Cannot call fallback function from the proxy admin

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 ...
zse's user avatar
  • 21
2 votes

Copy state from one contract to another

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 ...
Rob Hitchens's user avatar
  • 55.2k
2 votes

Pros and Cons of smart contract upgradable patterns

These 4 are really very well-know patterns. (1) After analysing the Delegatecall-based approach, I gave up because of two main reasons: 1. You can only add new variables, not delete or change existing ...
Suzana Maranhão Moreno's user avatar
2 votes

ERC20 not recognized by TokenTracker

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 ...
MovieExpert's user avatar
1 vote

Error installing [email protected]

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 ...
abcoathup's user avatar
  • 1,338

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