OpenZeppelin / openzeppelin-sdk

OpenZeppelin SDK repository for CLI and upgrades.js. No longer actively developed.
MIT License
431 stars 200 forks source link

Creating an upgradable contract creates 3 transactions #1563

Closed code-ishwar closed 4 years ago

code-ishwar commented 4 years ago

Hello,

When I deploy the Box.sol contract, it creates 3 transactions. I follow these instructions: https://docs.openzeppelin.com/learn/deploying-and-interacting#local-blockchain

Is it normal? I expect only one transaction to be deployed with 1 address. What are the other 2 addresses?

frangio commented 4 years ago

What you are likely seeing is the following three contracts:

  1. The proxy itself
  2. The implementation contract, that is the target of the proxy
  3. A ProxyAdmin contract, that is used to upgrade the proxy
code-ishwar commented 4 years ago

Many Thanks