SELECT DISTINCT METHOD_NAME
FROM flipside_prod_db.mdao_near.actions_events_function_call
WHERE startswith(METHOD_NAME, ‘{’);
Ty
Not sure how to classify this one as it looks like this is how we’re getting the data from the blockchain. I don’t think this one can be called a bug, just ugly data from NEAR.
Investigation notes:
I stepped backwards through our models to see how we are getting this from the source, just in case some of our transforms were causing the issue:
with
txs as (
select * from near.prod.transactions
where txn_hash in (
SELECT txn_hash
FROM near.prod.actions_events_function_call
where method_name like '{%'
)
),
actions as (
select
txn_hash,
block_timestamp,
index as action_index,
case
when value like '%CreateAccount%' then value
else OBJECT_KEYS(value)[0]::string
end as action_name,
case
when action_name = 'CreateAccount' then '{}'
else value[action_name]
end as action_data,
ingested_at,
value
from txs, lateral flatten( input => tx:actions )
)
select * from actions
Results are all a similar format to this:
{
"args": "e30=",
"deposit": "0",
"gas": 30000000000000,
"method_name": "{\"receiver_id\": \"jasonwes.near\", \"amount\": \"27777\"}"
}
Which actually matches what the NEAR explorer shows:
Ty @forg for such a quick response!
Your investigation notes make sense – ugly data from NEAR