Ganache v7 is out! Read more about it here: https://trufflesuite.com/blog/introducing-ganache-7/
sukanyaparashar on add-url-to-console
Add CodeNotSuppliedError, modif… reorganize how cli.js runs comm… reach POC for bundling individu… and 37 more (compare)
sukanyaparashar on add-url-to-console
Add documentation for the param… (compare)
lsqproduction on v5.5.16
at Object._extract (/Users/fox/.nvm/versions/node/v14.18.1/lib/node_modules/truffle/build/webpack:/packages/contract/lib/reason.js:29:1)
Hey guys, it's my first time too. I need some help to understand the problem here. I'm trying to deploy an ERC20 contract, but it has a liquidity pool and some Uniswap instantiating happening in the constructor, which is preventing the migration to succeed. I'm doing it on ropsten using infura, and used the ropsten version of uniswap factory address and all.
constructor () {
_rOwned[owner()] = _rTotal;
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x9c83dCE8CA20E9aAF9D3efc003b2ea62aBC08351);
// Create a uniswap pair for this new token
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), _uniswapV2Router.WETH());
// set the rest of the contract variables
uniswapV2Router = _uniswapV2Router;
//exclude owner and this contract from fee
_isExcludedFromFee[owner()] = true;
_isExcludedFromFee[address(this)] = true;
_isExcludedFromFee[MarketingWallet] = true;
_isExcluded[Dead] = true;
emit Transfer(address(0),owner() , _tTotal);
}
It works fine without those lines, but when I add them, it shouts this error:
Error: while migrating TESTCOIN: Returned error: base fee exceeds gas limit
Looking for some help with ganache usage via node.js:
I am testing a bridge application which tries to spawn multiple ganache-server instances for setup. I have the following function which was working fairly well on ganache-cli: "^6.12.2"
:
import ganache from 'ganache-cli';
export type GanacheAccounts = {
balance: string;
secretKey: string;
};
export function startGanacheServer(
port: number,
networkId: number,
populatedAccounts: GanacheAccounts[],
options: any = {}
) {
const ganacheServer = ganache.server({
accounts: populatedAccounts,
port: port,
network_id: networkId,
_chainId: networkId,
chainId: networkId,
_chainIdRpc: networkId,
...options,
});
ganacheServer.listen(port);
console.log(`Ganache Started on http://127.0.0.1:${port} ..`);
return ganacheServer;
}
I am testing another process in parallel - a relayer - which listens to events on one ganache instance and issues transactions on the other ganache instances. I am trying to debug some functionality on the relayer and I believe the instamine
feature of ganache could be having an effect.
My problem is that I attempt to change the above code to include a blockTime: 2
, entry into the options of the server()
call. And now in test setup I see errors such as Error: the tx doesn't have the correct nonce. account has nonce of: 15 tx has nonce of: 14.
I am in the process of attempting similar changes but bumping the version to "ganache": "^7.0.0-beta.2"
. I would appreciate any ideas on what could be the cause of the above error! Thank you.
npm ERR! code ENOENT npm ERR! syscall spawn git npm ERR! path git npm ERR! errno -4058 npm ERR! enoent An unknown git error occurred npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent
I am writing a unit tests for my Solidity smart contract using Truffle and Solidity and I can't find info how I can call a function from a different account. Able to create JS tests with multiple accounts fine. Anyone able to provide some insight?
Example Solidity test:
uint result = contract.doSomething() // How can I call this from another address?
"Kickstarter" -- Invalid number of parameters for "undefined". Got 0 expected 4!.
kickStarter.sol
has multiple contracts inside of it.
Hello everyone! I'm following along with the truffle tutorial and after a few tweeks got everything working great! However, now I'm struggling to add a returnPet() function to my solidity smart contract. The transaction fails and somehow metamask knows this ahead of time because it warns me that it might fail before confirming ("let's try anyway"). I've posted on stackoverflow, but responses have been slow. I feel like I'm missing something fundamental and could really use some help figuring out where to look first.
Thanks for reading.