CRYPTO NEWS

When calling execTransaction manually, it fails with GS026 – Invalid owner provided

I have signed the gnosis transaction with 2 owners and I can see this correctly in the Gnosis UI (i can even execute the transaction there). When I use the API, I get 2 confirmations with signature fields.

When trying to call the execTransaction method in the Gnosis Contract (using the first signer or another owner), I am concatenating the signature fields from confirmation, however, I get GS026 - Invalid owner provided.

I checked the gnosis contract and the failing line is

require(currentOwner > lastOwner && owners[currentOwner] != address(0) && currentOwner != SENTINEL_OWNERS, "GS026"); 

However, I don’t know exactly what is wrong because I used the third owner to execute the transaction (it requires 2 confirmations).

Can someone give me some hints? Thanks

How do you pass in a variable as a string to a constructor in solidity

I’m currently working on an NFT project, using the openzeppelin ERC721 standard for the nfts. When Inheriting the ERC721 NFT contract standard from openzeppelin you’re required to pass in the "tokenName" and "tokenSymbol" for the nft in the constructor. My issue with this is that in order to do this I need to hard-code the::Listen

I’m currently working on an NFT project, using the openzeppelin ERC721 standard for the nfts.

When Inheriting the ERC721 NFT contract standard from openzeppelin you’re required to pass in the "tokenName" and "tokenSymbol" for the nft in the constructor.

My issue with this is that in order to do this I need to hard-code the name of the nft and symbol into the contract before deploying. I don’t want that, I want to be able to create different NFTs with different names and symbols.

Instead of hard coding, I want to be able to give the NFTs a dynamic name and a symbol from the constructor, when I deploy the contract.

solidity version 0.8.4

This is a regular ERC721 constructor from openzeppelin; Token name "Metaverse Tokens" and symbol "METT" are hard-coded into the contract.

constructor (address marketPlaceAddress) ERC721 ("Metaverse Tokens", "METT") {     contractAddress = marketPlaceAddress; } 

This is my modified code; Token name and symbol are collected as inputs from the constructor in the contract.

constructor (address Dispenser, string memory _tokenName, string memory _tokenSymbol)  ERC721 (  tokenName  ,  tokenSymbol) {     // use Dispenser address to deploy NFT contract      contractAddress = Dispenser;     // set the name of the token     tokenName = _tokenName;     // set the symbol of the token     tokenSymbol = _tokenSymbol;     // set the tokenCount to 0 on deployment      tokenCount = 0; } 

The issue with my code is that it doesn’t pass in the name and symbol to the ERC721 contract that it inherits from, but the unmodified code passes them(name & symbol) in.

So my questions are as follows;

  1. How do you pass in a variable as a string to a constructor in solidity
  2. Am I on the right track with my code? and What do I need to change with my code to make this work
  3. Does the openZeppelin ERC721 contract not support this?
  4. Am I on the wrong track, and do you think I’m asking the wrong question

Please help

When calling execTransaction manually, it fails with GS026 – Invalid owner provided

Shopping cart
There are no products in the cart!
Continue shopping
0