Comments (1)
I tried to deploy using the following Hardhat Ignition script but encountered an error.
import { buildModule } from "@nomicfoundation/hardhat-ignition/modules";
const TokenStakeModule = buildModule("TokenStakeModule", (m) => {
const nativeTokenWrapper = m.getParameter(
"nativeTokenWrapper",
"0xdf572718C075C93544F5624ebF7B26bBb85ca8CE"
);
const defaultAdmin = m.getParameter("defaultAdmin", m.getAccount(0));
const contractURI = m.getParameter("contractURI", "ipfs://...");
const trustedForwarders = m.getParameter("trustedForwarders", []);
const rewardToken = m.getParameter(
"rewardToken",
"0xB3c3327A98a1F9b055b404F4b1629367d074C7eC"
);
const stakingToken = m.getParameter(
"stakingToken",
"0x6F0d766D99bf6007AF9364BEED348C177D877d82"
);
const timeUnit = m.getParameter("timeUnit", 60);
const rewardRatioNumerator = m.getParameter("rewardRatioNumerator", 1);
const rewardRatioDenominator = m.getParameter("rewardRatioDenominator", 10);
const tokenStake = m.contract("TokenStake", [nativeTokenWrapper]);
m.call(tokenStake, "initialize", [
defaultAdmin,
contractURI,
trustedForwarders,
rewardToken,
stakingToken,
timeUnit,
rewardRatioNumerator,
rewardRatioDenominator,
]);
return { tokenStake };
});
export default TokenStakeModule;
error message
$ npx hardhat ignition deploy ./ignition/modules/TokenStake.ts --reset
Hardhat Ignition 🚀
Deploying [ TokenStakeModule ]
Batch #1
Executed TokenStakeModule#TokenStake
Batch #2
Failed TokenStakeModule#TokenStake.initialize
[ TokenStakeModule ] failed ⛔
Futures failed during execution:
- TokenStakeModule#TokenStake.initialize: Simulating the transaction failed with error: Reverted with reason "Initializable: contract is already initialized"
To learn how to handle these errors: https://hardhat.org/ignition-errors
from contracts.
Related Issues (20)
- Can't verify contract deployed on Shibarium
- [EIP 4337] Withdrawing tokens from a contract to a smart account fails HOT 1
- Multiple currency support in MarketplaceV3 DirectListings contract. HOT 1
- Marketplace: Can't Buy NFT Listed For Free HOT 2
- AA Support for Custom Network HOT 4
- Thirdweb Latest Registry Addresses and Factory Addresses HOT 9
- Add nonReentrant modifier to relevant base contract functions
- Deletion on mapping containing a struct-with-mapping
- Apply checks-effects-integration across repo contracts or use nonReentrant
- Emit appropriate events in initialize function
- Update state variables that could be declared immutable as immutable
- Cache array length
- Contract deployment issue on Redbelly Devnet
- TypeError: Wrong argument count for function call: 2 arguments given but expected 1. - SafeERC20.sol:72
- isAuctionExpired view function is with wrong return value
- [ERC721Base] missing virtual on internal function _msgSender HOT 2
- # Forge projects forge install https://github.com/thirdweb-dev/contracts # Hardhat / npm based projects npm i @thirdweb-dev/contracts
- 0xd7fA7A779ea8c969f3976384d347e434826b8C90
- 0xd7fA7A779ea8c969f3976384d347e434826b8C90
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from contracts.