BEP20 token not showing total supply as i entered on code on bscscan - binance-smart-chain

I have deployed a BEP20 token. I followed the steps shown in this tutorial https://docs.binance.org/smart-chain/developer/issue-BEP20.html
and I entered total supply = 60000000000 but after varifying, the total supply is not showing which was I entered. Can anyone help me to add the total supply? The contract address is 0xE2cFe49999e3a133EaFE13388Eb47BCd223f5c5E

Your token uses 18 decimal places. Which means that the value 60000000000 hardcoded on line 359 of your contract represents 0.00000006 of the token. The BSCScan token tracker shows total supply 0 AAG just because it rounds to some predefined amount of decimals.
If you want a total supply of 60 billion, you need to add 18 zeros after this number to account for the decimals.
_totalSupply = 60000000000 * 1e18;

Related

How to sum certain values from Grafana-Loki logs?

I have this log line:
Successfully encrypted 189322 bytes for upload req_id=MediaUpload
Successfully encrypted 189322 bytes for upload req_id=MediaUpload
Successfully encrypted 492346 bytes for upload req_id=MediaUpload
There's a way to sum the bytes of the matching query log lines? Per example, by the those logs I would like to have a summed value of 870990 bytes or 0.87099 MB.
Is that possible?
Sure you can. Check this out.
I've used the pattern parser to extract the bytes as a number out of your log lines.
Then you can run a range query on top of that:
Eg.
sum by (app)
(sum_over_time(
{app="your-app"}
| pattern `Successfully encrypted <byte_size> bytes for upload req_id=<_>`
| unwrap byte_size
| __error__="" [$__interval]
))
you can change $__interval based on your needs.

API Response code for Page Speed Insights is presenting absurd numbers

Context: We are using this API for testing performance of selective pages https://developers.google.com/speed/docs/insights/v5/reference/pagespeedapi/runpagespeed
Problem statement: Till 18th Aug 22, the values in response code, used to be in similar ranges when user is manually checking scores at https://pagespeed.web.dev/. However, post 18th Aug, the some of the values have dropped significantly while Performance_score which used to be in decimals has started giving a response code as 1 - indicating 100 performance for mobile strategy - which we believe to be a data error.
Screenshot 1: Depicting score being reported as 1 (Being decimal, indicates as 100 score in API explorer)
enter image description here
Screenshot 2: Depicting score being reported as 61 when same URL is hit manually at https://pagespeed.web.dev/
enter image description here

Calculating timestamp from SCTS

I'm writing an api to an SMS receiving device and one of the fields I see is SCTS - Service Center Timestamp. I've sent an SMS to it at 15:26 UTC and I have the following SCTS: 22082211263196, so the time in this string is 11:26:31, i.e. UTC-4.
I can't make sense of the timezone offset - 96. It's supposed to be the number of quarter-hours + the sign. In binary this value translates to 1100000 so if the first 1 means minus, what remains is 100000 or 32 in decimal, i.e. 32/4 = 8, so UTC-8? Am I missing something? How do I get the correct timezone from SCTS?

square connect v2 api does not charge cents

square connect api is not charging cents. Example, if a client makes a purchase online for $17.25, my billing software shows paid for $17.25 but when I get my square report, it only collected or charged $17.00. So I'm short .25 cents.
My process-card.php file has this;
# Monetary amounts are specified in the smallest unit of the applicable currency.
# This amount is in cents. It's also hard-coded for $1.00, which isn't very useful.
"amount_money" => array (
"amount" => (int)$_POST['amount'] *100,
"currency" => "CAD"
then for testing purpose, I changed the *100 to *111, figuring that it will charge the cents, but this time instead of collecting $17.25 from the invoice, square report showed, received $18.87.
any help would be great.
thank-you
You are type casting your $_POST['amount']as an integer, which would remove anything after the decimal point.
Try removing the (int)

Exchange 2007 - GetUserAvailability over 128 mailboxes?

When making a GetUserAvailability call passing in 128 mailboxs Exchange 07 returns an EmailAddressArray error stating the allowed size of the array is 100.
Is there a way to increase the array size beyond 100, so that Exchange 07 returns with a GetUserAvailablity request?
I'm currently getting the following error:
System.Web.Services.Protocols.SoapException: Microsoft.Exchange.InfoWorker.Common.Availability.IdentityArrayTooBigException: There are too many target users in the EmailAddress array. The allowed size = 100; the actual size = 128. ---> There are too many target users in the EmailAddress array. The allowed size = 100; the actual size = 128.
No, at this time there is no way to increase this maximum number. Sorry, Richard
"The Availability service expands distribution lists to retrieve the free/busy status for each member of the list, as long as the number of mailboxes in the distribution list is less than 100 identities, which is the maximum number of identities that the Web service method can request."
Source: MSDN Library > Exchange Web Services Operations > GetUserAvailability Operation

Resources