Questions tagged [openzeppelin]

OpenZeppelin provides tools to write, deploy and operate decentralized applications. It also protects leading organizations by performing security audits on their systems and products.

OpenZeppelin provides tools to write, deploy and operate decentralized applications.

It also protects leading organizations by performing security audits on their systems and products.

237 questions
1
vote
1 answer

Why runs my SmartContract out of gas when I add a simple function

I have a simple token derived from openzeppelin's MintableToken. However, when I either add a Constructor OR another function, I am constantly running out of gas. But when I add ONLY one of both, either the Constructor OR the function, everything…
delete
  • 18,144
  • 15
  • 48
  • 79
1
vote
1 answer

Error: Invalid number of arguments to Solidity function in simple crowdsale contract

I am a beginner on smart contract development. I am using openZeppelin, truffle and Ganache to develop some really basic token and crowdsale contract. I came across an error when I tried to call the buytoken() method from the crowdsale contract in…
Neo Yang
  • 111
  • 2
  • 7
0
votes
0 answers

Error while compiling Solidity contract with OpenZeppelin's ERC721Enumerable.sol

I'm currently working on a Solidity smart contract that makes use of the ERC721Enumerable extension from OpenZeppelin. However, when I attempt to compile using Truffle, I encounter a ParserError. Here's the relevant part of my contract: //…
0
votes
0 answers

Using chainlink contracts and openzeppelin upgradeable contracts

I am using the VRFConsumerBaseV2 contract from the chainlink library. Now I'm trying to make my smart contracts updatable using the UUPS mechanism. How can I adapt VRFConsumerBaseV2 for use in updatable contracts? Perhaps there are ready-made…
0
votes
0 answers

Error: invalid format type (argument="format", value=true, code=INVALID_ARGUMENT, version=abi/5.6.1)

I am trying to deploy an upgradable contract using hardhat, i have installed all the dependencies and it compiles successfully however when i want to deploy it throws this error Error: invalid format type (argument="format", value=true,…
0
votes
0 answers

solidity: issues calling function in implementation contract function from proxy contract

I have one proxy contract and one implementation contact written in solidity. The steps I take is (I used Remix): deploy the implementation contract, get the contract address. go to compile details and found the initialize() function's bytecode,…
XYD
  • 591
  • 1
  • 5
  • 9
0
votes
0 answers

How to fix "invalid transaction key: 0" error when attempting to execute gasless transactions with OpenZeppelin and ether.js?

I am trying to execute a gasless transaction using openzeppelin relayers and ether.js but have not able to succeed in it. Currently i am getting this issue with the transaction object.Error pic. I am not using any smart contract here. I just want to…
0
votes
0 answers

Why cant receive ether on my proxy contract?

I use proxy implementation from hardhat. This is the smart contract code. // SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import…
ArKo
  • 1
0
votes
0 answers

Verifying a Smart Contract on BSC

I'm kind of a newbie to this. I created a token called -RealMoneyMakingArt- RMMA: https://bscscan.com/token/0x0e7cb43a58a56949e6779c42868c607d927d8ac1 Im trying to verify it, however I get errors like " Error! Unable to generate Contract ByteCode…
RMMA
  • 9
  • 1
0
votes
0 answers

Source "@openzeppelin/contracts/token/ERC20/ERC20.sol" not found: File import callback not supported (6275)

I need help with the following error while learning contracts. The error is in the title. I am using a Macbook and VS Code.enter image description here The code is not compiling and I need help trying to figure out how to get the code to run
0
votes
1 answer

call polygon infura api from lambda not working

We are trying to implement gasless mint through openzepplin defender and infura API. If it ran at local, it would work fine. But if it ran at AWS lambda, it does not work now. Through my investigating, this request(HTTPSProvider.getTransactionCount)…
0
votes
1 answer

Error "execution reverted: ERC721: invalid token ID" when trying to create NFT

I am trying to create a smart contract that gives the user an NFT in exchange of some MATIC tokens in the Polygon testnet. I am using Remix IDE and the environment used for teh deployment is the "Injected Provider - Metamask". When I deploy the…
Frenom
  • 21
  • 4
0
votes
1 answer

Error: Cannot find module ‘@openzeppelin/contracts

I'm trying to use the @openzeppelin library in my JS code which will be used to mint a token to goerli test net. I'm using Infura as API. I installed @openzeppelin/contracts to node_modules using the command " npm install @openzeppelin/contracts" I…
SaMLi
  • 1
  • 1
0
votes
0 answers

How to define Sub-Paths in remappings.txt in foundry?

I want the following import in src: // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.16; pragma abicoder v2; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import…
azvast
  • 337
  • 4
  • 10
0
votes
1 answer

How to create a proposal to send native token, eg.ETH

I am testing my Governor with timelock and ERC20 token, using truffle and ganache in js. I successfully completed the proposal cycle to grant funds from ERC20 token, and am trying to create a proposal where Governor can send native tokens (ETH) to a…