GithubHelp home page GithubHelp logo

smartcontract-upgrades-example's Introduction

Usage

Test

npx hardhat test

Verify

npx hardhat verify --network <NETWORK> <CONTRACT_ADDRESS> <CONSTRUCTOR_PARAMETERS>

ie:

npx hardhat verify --network <NETWORK> <CONTRACT_ADDRESS> <CONSTRUCTOR_PARAMETERS>

Download hardhat Follow the Openzeppelin guide

smartcontract-upgrades-example's People

Contributors

ab-verse avatar patrickalphac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

smartcontract-upgrades-example's Issues

Where can we keep track of implmentation contracts?

If I'm understanding this correctly the proxy contract is the one responsible for creating implementation contracts using the ProxyAdmin rules. However, I cannot see the proxy's contract code, all what we have is the implementation contract code (box.sol and box2.sol). What am I missing here?

I managed to deploy only the "TransparentUpgradeableProxy".

I believe there was an error when I first deployed the contract.
After fixing the error, I managed to deploy only the "TransparentUpgradeableProxy" contract.

How to redeploy like it was the first deployment so that I could get
"Box", "ProxyAdmin" and "TransparentUpgradeableProxy" contracts.

Thank you!

hardhat.config.js : Is the PRIVATE_KEY my Metamask account's Private Key?

hardhat.config.js

Is the PRIVATE_KEY my Metamask account's Private Key?
I have 0.5 ETH in my wallet on the Rinkeby Test Network.

"npx hardhat run --network rinkeby scripts/deploy.js" does not seems to interact with my Metamask's wallet.

I keep getting Error: insufficient funds.
Is there an extension that is needed to be installed on VSCode for this to work?

Thank you!

   ~/upgradable  npx hardhat run --network rinkeby scripts/deploy.js                              1 ✘  6s  
Deploying Box, ProxyAdmin, and then Proxy...
Error: insufficient funds for intrinsic transaction cost [ See: https://links.ethers.org/v5-errors-INSUFFICIENT_FUNDS ] (error={"name":"ProviderError","code":-32000,"_isProviderError":true}, method="sendTransaction", transaction=undefined, code=INSUFFICIENT_FUNDS, version=providers/5.6.4)
    at Logger.makeError (/home/jon/upgradable/node_modules/@ethersproject/logger/src.ts/index.ts:261:28)
    at Logger.throwError (/home/jon/upgradable/node_modules/@ethersproject/logger/src.ts/index.ts:273:20)
    at checkError (/home/jon/upgradable/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:81:16)
    at /home/jon/upgradable/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:243:24
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  reason: 'insufficient funds for intrinsic transaction cost',
  code: 'INSUFFICIENT_FUNDS',
  error: ProviderError: insufficient funds for gas * price + value
      at HttpProvider.request (/home/jon/upgradable/node_modules/hardhat/src/internal/core/providers/http.ts:74:19)
      at HDWalletProvider.request (/home/jon/upgradable/node_modules/hardhat/src/internal/core/providers/accounts.ts:182:36)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at EthersProviderWrapper.send (/home/jon/upgradable/node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20),
  method: 'sendTransaction',
  transaction: undefined
}
    ~/upgradable        

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.