CRYPTO NEWS

Bitcoin network activity decline suggests longer bear market: Glassnode

Although Bitcoin prices made a strong 15% recovery over the past week, metrics suggest more network demand would be needed to sustain further price increases.

Error when trying to operate on 2 uint256[] arrays

I have the following snippet uint256[] public s_results = [84080469561607224741111096759358273404425425552033897563872674800638878201820, 28991411665057923702694279928172111508485190268882343548752035358726143640092, 4073849607285761339133962439822675462101666430911877861844427717241312375805, 93722714462511979473853464262405424366019325671902046999248366992476892740462, 20373670703527142601825187246594349566634034465539917973148147160221536521035, 40957353350900529608244260039239095845058945157988798554139155362716373062366]; uint256[] public s_resultsParsed; function parseResults() public onlyOwner { uint8 idx = 0; for(idx = 0; idx < s_results.length; idx++ ){ s_resultsParsed[idx] = s_results[idx] % 10; } } The long uint256[] is a sample response I get from an oracle. What::Listen

I have the following snippet

uint256[] public s_results = [84080469561607224741111096759358273404425425552033897563872674800638878201820, 28991411665057923702694279928172111508485190268882343548752035358726143640092, 4073849607285761339133962439822675462101666430911877861844427717241312375805, 93722714462511979473853464262405424366019325671902046999248366992476892740462, 20373670703527142601825187246594349566634034465539917973148147160221536521035, 40957353350900529608244260039239095845058945157988798554139155362716373062366];  uint256[] public s_resultsParsed;  function parseResults() public onlyOwner {    uint8 idx = 0;    for(idx = 0; idx < s_results.length; idx++ ){        s_resultsParsed[idx] = s_results[idx] % 10;    } } 

The long uint256[] is a sample response I get from an oracle. What I want to do is to get the large uint, modulo it by 10 and generate numbers ranging from 0-9.

Running this code returns an error.

The transaction has been reverted to the initial state. Note: The called function should be payable if you send value and the value you send should be less than your current balance. Debug the transaction to get more information. 

I am really confused as I don’t understand how the code could be related to anything payable. My only hunch is I may be handling the array of uint256 inefficiently but I don’t know how else to proceed.

Bitcoin network activity decline suggests longer bear market: Glassnode

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