CRYPTO NEWS

Decode input data in bigquery on polygon

I have a problem in developing a program to decode the input data of transactions created by a smart contract on the polygon blockchain.

The smart contract:

https://polygonscan.com/address/0xb6041EAe62C4591458AF480679c6A497EDA6CfcD#code

encode input data decode input data

Tx:

https://polygonscan.com/tx/0x1130e3f485353dc9803abf6c741cb495a915a5c764fdbeee9fd7288d79a310eb

The function of the smart contract for which I want to decode the input data is:

function createPack(uint8 packType, bytes memory signature)

The steps are the following : 1a- Extraction of the data from the google dataset : public-data-finance.crypto_polygon.transactions 1b- Decoding in the query in the input_data field 2- Storage of the decoded data in the database

For steps 1a and 1b, I used this source on github : Gitub blockchain-etl/ethers.js-bigquery

I adapted the BigQuery query as follows:

CREATE TEMP FUNCTION   DECODE_CREATEPACK(data STRING)   RETURNS ARRAY<STRING>   LANGUAGE js AS """     var CTA_CREATEPACK = {       "inputs": [         {           "name": "packType",           "type": "uint8"         },         {           "name": "signature",           "type": "bytes"         }       ],       "name": "createPack",       "outputs": [],       "stateMutability": "payable",       "type": "function"     };      var interface_instance = new ethers.utils.Interface([CTA_CREATEPACK]);          --You might need to wrap with try-catch here as transaction input is user provided data and might not follow abi.      var parsedTransaction = interface_instance.parseTransaction({data: data});      return parsedTransaction.args; """ OPTIONS   ( library="gs://blockchain-etl-bigquery/ethers.js" ); SELECT   `hash`, DECODE_CREATEPACK(input) AS decoded_input FROM   `public-data-finance.crypto_polygon.transactions` WHERE   STARTS_WITH(input, "0x48b70391") -- 4byte sighash for createPack(uint8 packType, bytes signature) method   AND to_address = "0xb6041eae62c4591458af480679c6a497eda6cfcd" LIMIT 100; 

When running the query, I get the following error:

SyntaxError: Unexpected identifier at DECODE_CREATEPACK(STRING) line 21, columns 10-15 

As it seems that my problem comes from the ABI, I compiled the smart contract code on REMIX to get the ABI. However, I don’t have the ABI of the "Contract" functions

contract PremiumPack is ERC1155, Ownable, AccessControl, ReentrancyGuard { ... } 

My solidity skills are very limited so I am stuck on the tracks to solve my problem.

Do any of you have a clue?

Electrifying Live Casino Game XXXtreme Lightning Roulette in Exclusive Early Access

Play the brand new XXXtreme version of one of the most popular live casino games at Bitcoin.com Games; Lightning Roulette by Evolution! Now in Exclusive Early Access with a $ 2,000 Tournament Live casino games are a prime example of the new generation of casino games you can expect from Bitcoin.com Games. The live casino::Listen

Electrifying Live Casino Game XXXtreme Lightning Roulette in Exclusive Early Access en xxxtreme new article notext UpsIpy | BuyUcoin

Play the brand new XXXtreme version of one of the most popular live casino games at Bitcoin.com Games; Lightning Roulette by Evolution!

Now in Exclusive Early Access with a $ 2,000 Tournament

Live casino games are a prime example of the new generation of casino games you can expect from Bitcoin.com Games. The live casino format is the closest anyone could experience going to a brick-and-mortar casino with real dealers behind the screen. Not only are the dealers well-trained in the craft of conducting live casino games, but their sophisticated personas can also imbue the player’s gaming experience with a touch of luxury found only in the most privileged places in the world.

Bitcoin.com Games has been home to a host of many such live casino games that can be played with cryptocurrencies such as Bitcoin or Bitcoin Cash. A prime example of a massively popular live casino game hosted on our crypto casino is the award-winning Lightning Roulette from the software provider Evolution. Now, carrying forward the tradition of thunderous visuals and electrifying gaming experience, the provider is launching an XXXtreme version of the ever-popular game.

Our crypto casino Bitcoin.com Games is bringing you exclusive early access to the new game – XXXtreme Lightning Roulette, and an opportunity to win cash prizes worth $2,000. This latest addition to the live casino library is touted to be one of the most exhilarating games from the stables of Evolution.

Land Massive Money Multiples of up to 2,000x Your Bet Amount

XXXtreme Lightning Roulette combines live casino format with a high-payout RNG element to offer a wildly entertaining experience. What makes this new launch so XXXtreme is that you can score between 50x and 500x multipliers with up to ten Lightning and Chain Lightning numbers in total per game round – or score up to 2,000x your bet amount with the exciting Double Strikes feature!

XXXtreme Lightning Roulette is an electrifying new live casino game that features all the elements that made the original so much fun and pushes it to the XXXtreme. Play this new launch and participate in the early access tournament to win cash prizes of up to $1,000, only on Bitcoin.com Games.

What do you think about the XXXtreme Lightning Roulette casino game? Let us know what you think about it in the comments section below.

Decode input data in bigquery on polygon

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