Category : solidity

Link for reference of the event https://shasta.tronscan.org/#/contract/TAgiSFbxYo6PpiArd9i29w2zcDKrAXkmF8/events I have this on my tron event logs NickNameSet( 0 1 address _address string _nickname ) 0 TULEiwLiJ8VqHnv7s6ZKxoZ2Fm5tLySnDo 1 8a8ee74eeb71ea1031359ac2db66447ce30de8384b439ce14e1ee05fc75d9a3e address _address TULEiwLiJ8VqHnv7s6ZKxoZ2Fm5tLySnDo string _nickname 8a8ee74eeb71ea1031359ac2db66447ce30de8384b439ce14e1ee05fc75d9a3e The _nickname value is tricia. How do i decode the string _nickname to become readable for human? Javascript or PHP ways to ..

Read more

I’m using ‘@openzeppelin/truffle-upgrades’ plugin to create an upgradeable contract. First time doing this and going base off the websites article that they have on it. https://docs.openzeppelin.com/learn/upgrading-smart-contracts Everything compiles correct, but the 3_deploy_upgradeable_box.js is spitting out this error whenever I migrate "The requested contract was not found. Make sure the source code is available for compilation" ..

Read more

I was trying to print uint timeStamp by typing return timeStamp; right below return price; from this code: pragma solidity ^0.6.7; import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol"; contract PriceConsumerV3 { AggregatorV3Interface internal priceFeed; /** * Network: Kovan * Aggregator: BTC/USD * Address: 0x6135b13325bfC4B00278B4abC5e20bbce2D6580e */ constructor() public { priceFeed = AggregatorV3Interface(0x6135b13325bfC4B00278B4abC5e20bbce2D6580e); } /** * Returns the latest price */ function ..

Read more

test.js file I was trying to make some tests on Contracr and got i AssertionError error , below is the test which i have written. const provider = ganache.provider(); const web3 = new Web3(provider); const {interface,bytecode} = require(‘../compile’); let accounts; let inbox; beforeEach(async()=>{ accounts =await web3.eth.getAccounts(); inbox = await new web3.eth.Contract(JSON.parse(interface)) .deploy({ data: bytecode, arguments: ..

Read more