CRYPTO NEWS

Why am I NOT able to interact with ALL of my smart contract functions via my HTML GUI?

I have noticed something very strange…

I have a smart contract with two functions. I am able to interact with all of them (In Remix, Web3 Provider Environment, pragma solidity ^0.8.2) perfectly well. However, when I try calling the same functions via my Dapp (HTML GUI), I am ONLY able to interact with ONE of my functions, and NOT with the other.

Please help me understand what is going on.

Find below a snippet of my solidity functions:

    struct CryptoGift {     address from;     address to;     uint256 tokenId;     string  tokenName;     string  messageToRecipient;     uint256 createdAt;     uint256 firstReminderAt;     uint256 transferDate; }    CryptoGift[] private allGifts; mapping(address => CryptoGift[]) private myGifts;  function viewAllGifts() public view returns ( CryptoGift[] memory ) {        return allGifts;    }  function viewMyGifts() public view returns ( CryptoGift[] memory ) {             return myGifts[msg.sender]; } 

In Remix, using ENVIRONENT: Web3 Provider ACCOUNT: 0xb35abE6Cbf39AF6b547dB36C4645140F1d807413, both functions viewAllGifts and viewMyGifts work perfectly as illustrated below:

illustrating that both functions work in the Remix environment

However, in my HTML file, the viewAllGifts works perfectly while the viewMyGifts doesn’t work.

Find below a snippet from my viewMyGifts function in javascript:

contractMethods.viewMyGifts().call( ({}), (error, result)=> {     console.log("Your in viewMyGifts");      console.log("ethAddress: " +ethAddress);     console.log("Result: " +result);     console.log("Error: " +error);   if(!error){ }   else{} }); 

The above code yeilds:

Your in viewMyGifts ethAddress: 0xb35abe6cbf39af6b547db36c4645140f1d807413 Result:  Error: null  

While…

contractMethods.viewAllGifts().call( ({}), (error, result)=> {     console.log("Your in viewAllGifts");      console.log("ethAddress: " +ethAddress);     console.log("Result: " +result);     console.log("Error: " +error);   if(!error){ }      else{}  });    Your in viewAllGifts ethAddress: 0xb35abe6cbf39af6b547db36c4645140f1d807413 Result: 0xb35abE6Cbf39AF6b547dB36C4645140F1d807413,0x22Eb94E0DD34B70B9E718595D71bF5CF3065b1c4,100,BOO,I love you Boo 0,0,1652339951,1652339981,1652340011,0xb35abE6Cbf39AF6b547dB36C4645140F1d807413,0x22Eb94E0DD34B70B9E718595D71bF5CF3065b1c4,101,BOO,I love you Boo 1,0,1652339957,1652339987,1652340017,0xb35abE6Cbf39AF6b547dB36C4645140F1d807413,0x22Eb94E0DD34B70B9E718595D71bF5CF3065b1c4,102,BOO,I love you Boo 2,0,1652339962,1652339992,1652340022,0xb35abE6Cbf39AF6b547dB36C4645140F1d807413,0x22Eb94E0DD34B70B9E718595D71bF5CF3065b1c4,103,BOO,I love you Boo 3,0,1652339967,1652339997,1652340027 app.js:36 Error: null 

Your help is appreciated!

Goblin Town NFT Project Flips BAYC as Top NFT Collection

Goblin Town NFT has flipped BAYC to become the top collection. The project has recorded a sales volume of around $8.5 million over the past day. Its floor price has also seen a sharp increase, reaching ETH 1.94. The creature-themed Goblin Town non-fungible tokens (NFT) project has flipped the well-known NFT project Bored Ape Yacht::Listen

Goblin Town NFT Project

  • Goblin Town NFT has flipped BAYC to become the top collection.
  • The project has recorded a sales volume of around $8.5 million over the past day.
  • Its floor price has also seen a sharp increase, reaching ETH 1.94.

The creature-themed Goblin Town non-fungible tokens (NFT) project has flipped the well-known NFT project Bored Ape Yacht Club (BAYC) to become the top collection in terms of sales volume over the past 24 hours.

According to CryptoSlam, the project has recorded a sales volume of around $8.5 million over the past day, which is up by about 1000% from the day before.

In comparison to this, the BAYC collection saw a 24-hour trading volume of just over $2.8 million. This is approximately three times less than the Goblin Town project. This puts Goblin Town at the top of the sales volume list with the BAYC collection taking the second spot.

The Goblin Town project’s floor has also seen a sharp increase, reaching ETH 1.94 ($3,535). This is a 244% increase from the previous day.

In addition to this, the project has succeede …

Why am I NOT able to interact with ALL of my smart contract functions via my HTML GUI?

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