creating flowscored
7692
apps/flow/flowscored/flowscored.ai
Normal file
@ -1,17 +1,10 @@
|
||||
library(plotly)
|
||||
#library(plotly)
|
||||
library(data.table)
|
||||
library(shinyWidgets)
|
||||
library(shinyjs)
|
||||
#library(googlesheets4)
|
||||
#library(shinyBS) #modals
|
||||
#install_github("FlipsideCrypto/tools/terraConnectr")
|
||||
#library(shinycssloaders) # https://github.com/daattali/shinycssloaders loading animation v. good
|
||||
library(stringr)
|
||||
# scroller? should we? I dont' remember what this was tho tbh
|
||||
|
||||
#library(shinyWidgets)
|
||||
#library(shinyjs)
|
||||
#library(stringr)
|
||||
library(shinyBS)
|
||||
|
||||
load("data.RData")
|
||||
|
||||
# plots.bgcolor <- "transparent"
|
||||
# barchart.selected.color <- '#F2A71E'
|
||||
# barchart.passive.color <- '#5C6D7C'
|
||||
|
||||
|
||||
@ -1,109 +1,58 @@
|
||||
function(input, output, session) {
|
||||
|
||||
output$inputaddy <- renderUI({
|
||||
textInput(inputId = "addy", label = "Enter Your Address", value = "0x9244cd25314edd34")
|
||||
observeEvent(input$randomaddy, {
|
||||
|
||||
new.addys <- dual.address.set[sample(1:nrow(dual.address.set), 1)]
|
||||
|
||||
updateTextInput(session = session, "dapperaddy", value = new.addys$dapper)
|
||||
updateTextInput(session, "bloctoaddy", value = new.addys$blocto)
|
||||
|
||||
}, suspended = F)
|
||||
|
||||
|
||||
output$dapperaddyO <- renderUI({
|
||||
textInput(inputId = "dapperaddy", label = NULL, value = "0xc04f0af1dab0a999")
|
||||
})
|
||||
|
||||
|
||||
observeEvent(input$dapperconnect, {
|
||||
showModal(modalDialog(
|
||||
title = "Connect to Your Dapper Wallet",
|
||||
"do you want to be Jack F, Jack F or Angeal?",
|
||||
selectizeInput("dapperaddy", label = "NULL",
|
||||
choices = c("Jack F", "Other Jack F", "Angeal"), selected = input$dapperaddy)
|
||||
))
|
||||
output$bloctoaddyO <- renderUI({
|
||||
textInput(inputId = "bloctoaddy", label = NULL, value = "0x52eceb884aa542c6")
|
||||
})
|
||||
|
||||
#https://community.rstudio.com/t/persistent-selected-values-using-modal-selectinput/7160/2
|
||||
observeEvent(input$bloctoconnect, {
|
||||
showModal(modalDialog(
|
||||
title = "Connect to Your Blocto Wallet",
|
||||
"coming soon..."
|
||||
))
|
||||
userData <- reactive({
|
||||
user.stats[user_address %in% c(input$dapperaddy, input$bloctoaddy)]
|
||||
})
|
||||
|
||||
ripScore <- reactive(c(0, 1,2,3)[max(which(sum(userData()$n_rips) >= c(0, 1,5,10)))])
|
||||
listingScore <- reactive(c(0, 1,2,3)[max(which(sum(userData()$n_listings) >= c(0, 1,5,10)))])
|
||||
dapperBuysScore <- reactive(c(0, 1,2,3)[max(which(sum(userData()$n_nft_buys_dapper) >= c(0, 1,5,10)))])
|
||||
nonDapperTradesScore <- reactive(c(0, 1)[max(which(sum(userData()$n_nft_trades_nd) >= c(0, 1)))])
|
||||
stakesScore <- reactive( c(0, 1)[max(which(sum(userData()$n_stakes) >= c(0, 1)))])
|
||||
swapsScore <- reactive(c(0, 1)[max(which(sum(userData()$n_swaps) >= c(0, 1)))])
|
||||
totalScore <- reactive(ripScore() + listingScore() + dapperBuysScore() + nonDapperTradesScore() + stakesScore() + swapsScore())
|
||||
|
||||
jackf1 <- c("0x69a1f5cefd1e0fdf", "0xcf3ead0e195bdd0f")
|
||||
angeal <- c("0xc04f0af1dab0a999", "0x52eceb884aa542c6")
|
||||
jackf2 <- c("0xcc17b1ed3d9b079c", "0x60787d9233b782ad")
|
||||
|
||||
userAddys <- reactive({
|
||||
if(input$dapperaddy == "Jack F") {
|
||||
jackf1
|
||||
} else if(input$dapperaddy == "Other Jack F") {
|
||||
jackf2
|
||||
} else {
|
||||
angeal
|
||||
}
|
||||
})
|
||||
output$totalscore <- renderText(totalScore())
|
||||
|
||||
n.users <- nrow(flowscored.metrics.w)
|
||||
|
||||
thisUser_nft_n_trades <- reactive( sum(flowscored.metrics.w[user_address %in% userAddys()]$nft_n_trades) )
|
||||
output$nft_n_trades <- renderText(thisUser_nft_n_trades())
|
||||
output$nft_n_trades_p <- renderText(round(nrow(flowscored.metrics.w[nft_n_trades < thisUser_nft_n_trades()])/n.users, 2))
|
||||
output$dapper1 <- renderText(ripScore())
|
||||
output$dapper1text <- renderText(paste0(sum(userData()$n_rips), " pack rips"))
|
||||
|
||||
thisUser_days_since_last_tx <- reactive( sum(flowscored.metrics.w[user_address %in% userAddys()]$days_since_last_tx) )
|
||||
output$days_since_last_tx <- renderText(thisUser_days_since_last_tx())
|
||||
output$days_since_last_tx_p <- renderText(round(nrow(flowscored.metrics.w[days_since_last_tx < thisUser_days_since_last_tx()])/n.users, 2))
|
||||
output$dapper2 <- renderText(listingScore())
|
||||
output$dapper2text <- renderText(paste0(sum(userData()$n_listings), " listings"))
|
||||
|
||||
thisUser_nft_n_projects <- reactive( sum(flowscored.metrics.w[user_address %in% userAddys()]$nft_n_projects) )
|
||||
output$nft_n_projects <- renderText(thisUser_nft_n_projects())
|
||||
output$nft_n_projects_p <- renderText(round(nrow(flowscored.metrics.w[nft_n_projects < thisUser_nft_n_projects()])/n.users, 2))
|
||||
output$dapper3 <- renderText(dapperBuysScore())
|
||||
output$dapper3text <- renderText(paste0(sum(userData()$n_nft_buys_dapper), " marketplace buys"))
|
||||
|
||||
thisUser_nft_n_listings <- reactive( sum(flowscored.metrics.w[user_address %in% userAddys()]$nft_n_listings) )
|
||||
output$nft_n_listings <- renderText(thisUser_nft_n_listings())
|
||||
output$nft_n_listings_p <- renderText(round(nrow(flowscored.metrics.w[nft_n_listings < thisUser_nft_n_listings()])/n.users, 2))
|
||||
output$bonus1 <- renderText(nonDapperTradesScore())
|
||||
output$bonus1text <- renderText(paste0(sum(userData()$n_nft_trades_nd), " non-Dapper NFT trades"))
|
||||
|
||||
output$bonus2 <- renderText(stakesScore())
|
||||
output$bonus2text <- renderText(paste0(sum(userData()$n_stakes), " FLOW stakes"))
|
||||
|
||||
output$bonus3 <- renderText(swapsScore())
|
||||
output$bonus3text <- renderText(paste0(sum(userData()$n_swaps), " dex swaps"))
|
||||
|
||||
|
||||
|
||||
output$action_listed_nft <- renderText({
|
||||
if( sum(flowscored.metrics.w[user_address %in% userAddys()]$list_nft) > 0 ) {
|
||||
"🏆"
|
||||
} else {
|
||||
"❌"
|
||||
}
|
||||
})
|
||||
|
||||
output$action_bought_nfts <- renderText({
|
||||
if( sum(flowscored.metrics.w[user_address %in% userAddys()]$list_nft) > 0 ) {
|
||||
"🏆"
|
||||
} else {
|
||||
"❌"
|
||||
}
|
||||
})
|
||||
|
||||
output$action_staked_flow <- renderText({
|
||||
if( sum(flowscored.metrics.w[user_address %in% userAddys()]$staked_flow) > 0 ) {
|
||||
"🏆"
|
||||
} else {
|
||||
"❌"
|
||||
}
|
||||
})
|
||||
|
||||
output$action_dex_swap <- renderText({
|
||||
if( sum(flowscored.metrics.w[user_address %in% userAddys()]$dex_swapper) > 0 ) {
|
||||
"🏆"
|
||||
} else {
|
||||
"❌"
|
||||
}
|
||||
})
|
||||
|
||||
# output$award_positive_trader <- renderText({
|
||||
# if(flowscored.metrics.w[user_address %in% userAddys()]$positive_trader) {
|
||||
# "🏆"
|
||||
# } else {
|
||||
# "❌"
|
||||
# }
|
||||
# })
|
||||
#
|
||||
# output$badge_topshot_trader <- renderText({
|
||||
# if(flowscored.metrics.w[user_address %in% userAddys()]$top_topshot_trader == 1) {
|
||||
# "🏆"
|
||||
# } else {
|
||||
# "❌"
|
||||
# }
|
||||
# })
|
||||
#
|
||||
|
||||
}
|
||||
|
||||
7327
apps/flow/flowscored/shapes.ai
Normal file
@ -1,93 +1,122 @@
|
||||
|
||||
fluidPage(
|
||||
tags$head(
|
||||
tags$link(rel = "stylesheet", type = "text/css", href = "shiny.css"),
|
||||
tags$link(rel = "stylesheet", href = "https://fonts.googleapis.com/css?family=Roboto+Mono"),
|
||||
tags$link(rel = "stylesheet", href = "https://fonts.googleapis.com/css?family=Inter")
|
||||
tags$link(rel = "stylesheet", type = "text/css", href = "shiny.css")
|
||||
# tags$link(rel = "stylesheet", href = "https://fonts.googleapis.com/css?family=Roboto+Mono"),
|
||||
# tags$link(rel = "stylesheet", href = "https://fonts.googleapis.com/css?family=Epilogue:wght@400;500;600;700;900&display=swap")
|
||||
),
|
||||
|
||||
br(),
|
||||
fluidRow(
|
||||
class = "wrapper",
|
||||
fluidRow(
|
||||
column(4, img(src = "flow_logo.png", width = "100px")),
|
||||
column(8, "Welcome 2 Flow-sanity")
|
||||
),
|
||||
fluidRow(column(12, "Connect your wallets to see if you're a Flow Hero or a Flow Zero.")),
|
||||
fluidRow(class = "titlerow",
|
||||
column(9, class = "title", img(src = "flowscored_logo.svg", width = '360px')),
|
||||
column(3,
|
||||
div(id = "icons",
|
||||
div(class = "aboutlinks",
|
||||
a(id = 'fork',
|
||||
href = "https://github.com/FlipsideCrypto/user_metrics/tree/main/apps/flow/flowscored",
|
||||
img(src = "github.svg", width = "30px"),
|
||||
target = "_blank")),
|
||||
bsTooltip(id = "fork",
|
||||
title = "Fork this App",
|
||||
placement = "bottom", trigger = "hover"),
|
||||
div(class = "aboutlinks",
|
||||
a(id = "flippy",
|
||||
href = "https://next.flipsidecrypto.xyz/",
|
||||
img(src = "flipside.svg", width = "30px"),
|
||||
target = "_blank")),
|
||||
bsTooltip(id = "flippy",
|
||||
title = "Get the Data",
|
||||
placement = "bottom", trigger = "hover"),
|
||||
actionButton(inputId = "randomaddy", label = img(src = "random.svg", height = "26"))
|
||||
# div(class = "aboutlinks",
|
||||
# a(id = "solana", href = "https://solana.com",
|
||||
# img(src = "solana.svg", width = "30px"),
|
||||
# target = "_blank")),
|
||||
# bsTooltip(id = "solana",
|
||||
# title = "Solana",
|
||||
# placement = "bottom", trigger = "hover")
|
||||
|
||||
))),
|
||||
br(),
|
||||
|
||||
fluidRow(
|
||||
column(2, ""),
|
||||
column(4, actionButton(inputId = "dapperconnect", img(src = "dapper.png", height = "75px"))),
|
||||
column(4, actionButton(inputId = "bloctoconnect", img(src = "blocto.png", height = "75px"))),
|
||||
column(2, "")
|
||||
fluidRow(id = "waltitle", column(6, "Dapper Wallet"), column(6, "Non-Dapper Wallet")),
|
||||
bsTooltip(id = "waltitle", title = "Increase your score by connecting two wallets!", placement = "top", trigger = "hover"),
|
||||
|
||||
fluidRow(column(1, img(src = "dapper.png", width = "30px")),
|
||||
column(5, uiOutput("dapperaddyO")),
|
||||
column(1, img(src = "wallet.svg", width = "30px")),
|
||||
column(5, uiOutput("bloctoaddyO"))
|
||||
),
|
||||
|
||||
fluidRow("180-Day Stats & Rankings"),
|
||||
fluidRow(column(12,
|
||||
class = "scoreholder",
|
||||
img(src = 'shape_backgrounds-01.svg', width = "100%"),
|
||||
div(class = "centered", textOutput("totalscore"))),
|
||||
),
|
||||
br(),
|
||||
|
||||
fluidRow(class = "title", "Dapper Points - up to 3 each thing (last 90 days)"),
|
||||
|
||||
fluidRow(
|
||||
column(6, ""),
|
||||
column(3, "YOU"),
|
||||
column(3, "Percentile")
|
||||
),
|
||||
fluidRow(
|
||||
column(6, "# Trades"),
|
||||
column(3, textOutput(outputId = "nft_n_trades")),
|
||||
column(3, textOutput("nft_n_trades_p"))
|
||||
),
|
||||
fluidRow(
|
||||
column(6, "# Days Since Last Txn"),
|
||||
column(3, textOutput("days_since_last_tx")),
|
||||
column(3, textOutput("days_since_last_tx_p"))
|
||||
),
|
||||
fluidRow(
|
||||
column(6, "# NFT Listings"),
|
||||
column(3, textOutput("nft_n_listings")),
|
||||
column(3, textOutput("nft_n_listings_p"))
|
||||
),
|
||||
fluidRow(
|
||||
column(6, "# Projects Traded"),
|
||||
column(3, textOutput("nft_n_projects")),
|
||||
column(3, textOutput("nft_n_projects_p"))
|
||||
column(4, class = "scoreholder",
|
||||
img(src = 'shape_backgrounds-03.svg', width = "100%"),
|
||||
div(class = "centered",
|
||||
div(class = "scoretitle", "Ripper"),
|
||||
div(class = "score", textOutput("dapper1")),
|
||||
div(class = "scoresubtitle", textOutput("dapper1text"))
|
||||
)),
|
||||
|
||||
column(4, class = "scoreholder",
|
||||
img(src = 'shape_backgrounds-04.svg', width = "100%"),
|
||||
div(class = "centered",
|
||||
div(class = "scoretitle", "Lister"),
|
||||
div(class = "score", textOutput("dapper2")),
|
||||
div(class = "scoresubtitle", textOutput("dapper2text"))
|
||||
)),
|
||||
|
||||
column(4, class = "scoreholder",
|
||||
img(src = 'shape_backgrounds-05.svg', width = "100%"),
|
||||
div(class = "centered",
|
||||
div(class = "scoretitle", "Buyer"),
|
||||
div(class = "score", textOutput("dapper3")),
|
||||
div(class = "scoresubtitle", textOutput("dapper3text"))
|
||||
))
|
||||
),
|
||||
|
||||
br(),hr(),br(),
|
||||
br(),
|
||||
|
||||
fluidRow("Notable 180 Day Actions"),
|
||||
fluidRow(class = "title", "Bonus Points - up to 3 total (last 90 days)"),
|
||||
|
||||
fluidRow(
|
||||
column(6,
|
||||
div(class = 'actions', textOutput("action_listed_nft"), "Listed an NFT on Flowty")),
|
||||
column(6,
|
||||
div(class = 'actions', textOutput("action_bought_nfts"), "Bought >3 NFTs"))
|
||||
),
|
||||
|
||||
fluidRow(
|
||||
column(6,
|
||||
textOutput("action_staked_flow"), "Staked Flow"),
|
||||
column(6,
|
||||
textOutput("action_dex_swap"), "Swapped on a Dex")
|
||||
),
|
||||
|
||||
br(),hr(),br(),
|
||||
|
||||
fluidRow("Achievements"),
|
||||
|
||||
fluidRow(
|
||||
column(6,
|
||||
"🏀 Topshot Trader"),
|
||||
"Profitable NFT Trader",
|
||||
column(6,
|
||||
"📈 Defiaholic")
|
||||
),
|
||||
|
||||
br(),hr(),br(),
|
||||
|
||||
fluidRow(
|
||||
column(8, "Overall you're a: ", div("Flow Hero", style = "color: #F2CD11")),
|
||||
column(4, "by Flipside")
|
||||
column(4, class = "scoreholder",
|
||||
img(src = 'shape_backgrounds-02.svg', width = "100%"),
|
||||
div(class = "centered",
|
||||
div(class = "scoretitle", "Trader"),
|
||||
div(class = "score", textOutput("bonus1")),
|
||||
div(class = "scoresubtitle", textOutput("bonus1text"))
|
||||
)),
|
||||
|
||||
column(4, class = "scoreholder",
|
||||
img(src = 'shape_backgrounds-07.svg', width = "100%"),
|
||||
div(class = "centered",
|
||||
div(class = "scoretitle", "Staker"),
|
||||
div(class = "score", textOutput("bonus2")),
|
||||
div(class = "scoresubtitle", textOutput("bonus2text"))
|
||||
)),
|
||||
|
||||
column(4, class = "scoreholder",
|
||||
img(src = 'shape_backgrounds-06.svg', width = "100%"),
|
||||
div(class = "centered",
|
||||
div(class = "scoretitle", "Swapper"),
|
||||
div(class = "score", textOutput("bonus3")),
|
||||
div(class = "scoresubtitle", textOutput("bonus3text"))
|
||||
))
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) # close wrapper
|
||||
|
||||
|
||||
@ -1,242 +1,560 @@
|
||||
# https://github.com/FlipsideCrypto/sdk/tree/main/r/shroomDK
|
||||
source("~/data_science/util/util_functions.R")
|
||||
|
||||
|
||||
setwd("~/user_metrics/")
|
||||
activity.stats.query <- paste(readLines("sql/activity/flow/activity_stats.sql"), collapse = "\n")
|
||||
activity.stats <- QuerySnowflake(activity.stats.query)
|
||||
|
||||
dex.swaps.query <- paste(readLines("sql/defi/flow/dex_swaps.sql"), collapse = "\n")
|
||||
dex.swaps <- QuerySnowflake(dex.swaps.query)
|
||||
|
||||
lp.activity.query <- paste(readLines("sql/defi/flow/lp_activity.sql"), collapse = "\n")
|
||||
#lp.activity <- QuerySnowflake(lp.activity.query)
|
||||
|
||||
defi.staking.query <- paste(readLines("sql/defi/flow/staking.sql"), collapse = "\n")
|
||||
defi.staking <- QuerySnowflake(defi.staking.query)
|
||||
|
||||
chain.stakes.query <- paste(readLines("sql/governance/flow/chain_stakes.sql"), collapse = "\n")
|
||||
chain.stakes <- QuerySnowflake(chain.stakes.query)
|
||||
|
||||
nft.trades.query <- paste(readLines("sql/nfts/flow/nft_trades.sql"), collapse = "\n")
|
||||
nft.trades <- QuerySnowflake(nft.trades.query)
|
||||
nft.trades[, n_trades := n_buys + n_sells]
|
||||
nft.trades[, profit_usd := sell_usd_volume - buy_usd_volume]
|
||||
|
||||
nft.trades[, list(user_profit_usd = sum(profit_usd), n_trades = sum(n_trades)), by = "user_address,nf_token_contract"] %>%
|
||||
.[, list(n_users = uniqueN(user_address), prop_profitiable = mean(user_profit_usd > 0), n_trades = sum(n_trades)/2), by = nf_token_contract] %>%
|
||||
.[order(prop_profitiable)]
|
||||
|
||||
|
||||
nft.listings.query <- paste(readLines("sql/nfts/flow/nft_listings.sql"), collapse = "\n")
|
||||
nft.listings <- QuerySnowflake(nft.listings.query)
|
||||
|
||||
nft.lending.query <- paste(readLines("sql/nfts/flow/nft_lending.sql"), collapse = "\n")
|
||||
nft.lending <- QuerySnowflake(nft.lending.query)
|
||||
|
||||
cex.activity.query <- paste(readLines("sql/bags/flow/cex_activity.sql"), collapse = "\n")
|
||||
cex.activity <- QuerySnowflake(cex.activity.query)
|
||||
|
||||
bridge.activity.query <- paste(readLines("~/user_metrics/sql/bags/flow/bridge_activity.sql"), collapse = "\n")
|
||||
bridge.activity <- QuerySnowflake(bridge.activity.query)
|
||||
|
||||
token.accumulation.query <- paste(readLines("sql/bags/flow/token_accumulation.sql"), collapse = "\n")
|
||||
token.accumulation <- QuerySnowflake(token.accumulation.query)
|
||||
token.accumulation <- token.accumulation[token_in_volume > 0.001 | token_out_volume > 0.001]
|
||||
|
||||
flow.labels <- QuerySnowflake("SELECT * FROM FLIPSIDE_PROD_DB.CROSSCHAIN.ADDRESS_LABELS where blockchain = 'flow'")
|
||||
flow.contracts <- QuerySnowflake("SELECT * FROM flow.core.dim_contract_labels")
|
||||
|
||||
nft.profits <- nft.trades[, list(user_profit_usd = sum(profit_usd), n_trades = sum(n_trades)), by = "user_address,nf_token_contract"] %>%
|
||||
.[, list(n_users = uniqueN(user_address), prop_profitiable = mean(user_profit_usd > 0), n_trades = sum(n_trades)/2), by = nf_token_contract] %>%
|
||||
.[order(-prop_profitiable)]
|
||||
# rrrrips
|
||||
pack.rips <- QuerySnowflake("
|
||||
with wdraws AS (
|
||||
SELECT
|
||||
tx_id,
|
||||
event_data:from::string AS xfer_from,
|
||||
event_data:id::string AS nft_id
|
||||
FROM
|
||||
FLOW.CORE.fact_events
|
||||
where
|
||||
block_timestamp > current_date - 90
|
||||
AND
|
||||
tx_id not in (SELECT tx_id from flow.core.ez_nft_sales)
|
||||
AND
|
||||
event_type = 'Withdraw'
|
||||
AND
|
||||
(
|
||||
|
||||
# # increment fi
|
||||
# flow.contracts <- QuerySnowflake("SELECT * FROM flow.core.dim_contract_labels")
|
||||
# flow.contracts[str_detect(tolower(contract_name), "fi")]
|
||||
#
|
||||
# "SwapFactory"
|
||||
# flow.contracts[account_address == "0xb063c16cac85dbd1"]
|
||||
# flow.contracts[account_address == "0xecbda466e7f191c7"]
|
||||
#
|
||||
# "SwapRouter"
|
||||
# flow.contracts[account_address == "0xa6850776a94e6551"]
|
||||
# "SwapPair (Template contract)"
|
||||
# "SwapInterfaces, SwapConfig, SwapError"
|
||||
# flow.contracts[account_address == "0xb78ef7afa52ff906"]
|
||||
#
|
||||
# # a thing?
|
||||
# # A.39e42c67cc851cfb.EmeraldIdentityDapper EmeraldIDCreated 6769
|
||||
#
|
||||
# # my increment finance swap:
|
||||
# "eb2c1c7d496807d53bba076cc1c3afe16552b9e757d3a41323598b33fd2ddf96"
|
||||
#
|
||||
# all.contracts.events[str_detect(tolower(event_type), "dep")]
|
||||
#
|
||||
# all.contracts.events[str_detect(tolower(event_contract), "dapp")]
|
||||
#
|
||||
# dex.swaps[, .N, by = "token_contract"]
|
||||
#
|
||||
# all.contracts.events.swaps <- QuerySnowflake("select event_contract, event_type, count(tx_id) as n_txn from FLOW.CORE.FACT_EVENTS
|
||||
# where block_timestamp > current_date - 90
|
||||
# AND event_type = 'Swap'
|
||||
# group by event_contract, event_type")
|
||||
(event_data:from = '0xe1f2a091f7bb5245' AND event_contract = 'A.0b2a3299cc857e29.TopShot')
|
||||
OR
|
||||
(event_data:from IN ('0xe4cf4bdc1751c65d', '0x44c6a6fd2281b6cc') AND event_contract = 'A.e4cf4bdc1751c65d.AllDay')
|
||||
OR
|
||||
(event_data:from IN ('0x87ca73a41bb50ad5', '0xb6f2481eba4df97b') AND event_contract = 'A.87ca73a41bb50ad5.Golazos')
|
||||
OR
|
||||
(event_data:from = '0x329feb3ab062d289' AND event_contract = 'A.329feb3ab062d289.UFC_NFT')
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
SELECT
|
||||
event_data:to::string AS user_address,
|
||||
event_contract AS nft_collection,
|
||||
count(distinct(fe.tx_id)) AS n_rips,
|
||||
count(distinct(event_data:id::string)) AS n_nft_ids_ripped
|
||||
FROM
|
||||
FLOW.CORE.fact_events fe
|
||||
JOIN wdraws on fe.tx_id = wdraws.tx_id AND fe.event_data:id::string = wdraws.nft_id
|
||||
WHERE
|
||||
event_contract IN ('A.0b2a3299cc857e29.TopShot', 'A.e4cf4bdc1751c65d.AllDay', 'A.329feb3ab062d289.UFC_NFT', 'A.87ca73a41bb50ad5.Golazos')
|
||||
AND
|
||||
event_type = 'Deposit'
|
||||
GROUP BY
|
||||
user_address, nft_collection
|
||||
")
|
||||
|
||||
|
||||
# basic stats:
|
||||
|
||||
# trades
|
||||
flowscored.metrics <- nft.trades[, list(metric_name = "nft_n_buys", metric = n_buys), by = list(user_address)]
|
||||
flowscored.metrics <- nft.trades[, list(metric_name = "nft_n_sells", metric = n_sells), by = list(user_address)]
|
||||
# days since last tx
|
||||
flowscored.metrics <- rbind(flowscored.metrics,
|
||||
activity.stats[, list(user_address, metric_name = "days_since_last_tx", metric = last_txn)])
|
||||
# different nft projects traded
|
||||
flowscored.metrics <- rbind(flowscored.metrics,
|
||||
nft.trades[, list(metric_name = "nft_n_projects", metric = uniqueN(nft_project)), by = list(user_address)])
|
||||
# listings
|
||||
flowscored.metrics <- rbind(flowscored.metrics,
|
||||
nft.listings[, list(metric_name = "nft_n_listings", metric = n_listings), by = list(user_address)])
|
||||
nft.listings <- QuerySnowflake("
|
||||
WITH listings AS (
|
||||
select
|
||||
event_data:seller::string AS user_address,
|
||||
count(tx_id) AS listings
|
||||
FROM flow.core.fact_events
|
||||
WHERE
|
||||
event_contract IN ('A.c1e4f4f4c4257510.TopShotMarketV3', 'A.c38aea683c0c4d38.Market')
|
||||
AND
|
||||
event_type = 'MomentListed'
|
||||
AND
|
||||
block_timestamp >= current_date - 180
|
||||
AND
|
||||
tx_succeeded = TRUE
|
||||
GROUP BY user_address
|
||||
|
||||
UNION
|
||||
|
||||
select
|
||||
event_data:storefrontAddress::string AS user_address,
|
||||
count(tx_id) AS listings
|
||||
FROM flow.core.fact_events
|
||||
WHERE
|
||||
event_contract IN ('A.4eb8a10cb9f87357.NFTStorefront', 'A.4eb8a10cb9f87357.NFTStorefrontV2')
|
||||
AND
|
||||
event_type = 'ListingAvailable'
|
||||
AND
|
||||
block_timestamp >= current_date - 180
|
||||
AND
|
||||
tx_succeeded = TRUE
|
||||
GROUP BY user_address
|
||||
|
||||
flowscored.metrics.w <- dcast.data.table(flowscored.metrics,
|
||||
user_address ~ metric_name, value.var = "metric", fun.aggregate = sum, fill = 0)
|
||||
UNION
|
||||
|
||||
select
|
||||
event_data:seller::string AS user_address,
|
||||
count(tx_id) AS listings
|
||||
FROM flow.core.fact_events
|
||||
WHERE
|
||||
event_contract = 'A.85b075e08d13f697.OlympicPinMarket'
|
||||
AND
|
||||
event_type = 'PieceListed'
|
||||
AND
|
||||
block_timestamp >= current_date - 180
|
||||
AND
|
||||
tx_succeeded = TRUE
|
||||
GROUP BY user_address
|
||||
|
||||
)
|
||||
|
||||
SELECT
|
||||
user_address,
|
||||
sum(listings) AS n_listings
|
||||
FROM
|
||||
listings
|
||||
WHERE
|
||||
user_address NOT IN (SELECT account_address FROM FLOW.CORE.DIM_CONTRACT_LABELS)
|
||||
AND
|
||||
user_address NOT IN (SELECT address FROM FLIPSIDE_PROD_DB.CROSSCHAIN.ADDRESS_LABELS WHERE blockchain = 'flow')
|
||||
GROUP BY user_address
|
||||
")
|
||||
|
||||
|
||||
# noteable actions
|
||||
flowscored.metrics.w[, list_nft := ifelse(user_address %in% nft.listings$user_address, 1, 0)]
|
||||
flowscored.metrics.w[, bought_nfts := ifelse(user_address %in% nft.trades[n_buys > 0]$user_address, 1, 0)]
|
||||
|
||||
flowscored.metrics.w[, staked_flow := ifelse(user_address %in% chain.stakes[n_stakes > 0]$user_address, 1, 0)]
|
||||
flowscored.metrics.w[, dex_swapper := ifelse(user_address %in% dex.swaps$user_address, 1, 0)]
|
||||
nft.sales <- QuerySnowflake("WITH daily_prices AS (
|
||||
SELECT
|
||||
symbol,
|
||||
token_contract,
|
||||
date_trunc('day', timestamp) AS day,
|
||||
AVG(price_usd) AS price
|
||||
FROM flow.core.fact_prices
|
||||
--WHERE token_contract = 'A.16546533918040a61.FlowToken'
|
||||
WHERE timestamp > current_date - 91
|
||||
GROUP BY symbol, token_contract, day
|
||||
),
|
||||
missing_prices AS (
|
||||
SELECT currency FROM flow.core.ez_nft_sales WHERE currency NOT IN (select token_contract from flow.core.fact_prices) group by currency
|
||||
),
|
||||
sells AS (
|
||||
SELECT
|
||||
seller AS user_address,
|
||||
marketplace,
|
||||
nft_collection AS nf_token_contract,
|
||||
count(distinct(nft_id)) AS n_nfts_sold,
|
||||
COALESCE(dp.symbol, SPLIT_PART(currency, '.', 2)) AS sell_symbol,
|
||||
currency,
|
||||
count(tx_id) AS n_sells,
|
||||
sum(ns.price) AS token_sell_volume,
|
||||
CASE
|
||||
WHEN currency IN (select currency FROM missing_prices)
|
||||
THEN sum(ns.price * 1)
|
||||
ELSE sum(ns.price * dp.price)
|
||||
END AS sell_usd_volume
|
||||
FROM
|
||||
flow.core.ez_nft_sales ns
|
||||
LEFT JOIN daily_prices dp ON date_trunc('day', ns.block_timestamp) = dp.day
|
||||
AND ns.currency = dp.token_contract
|
||||
WHERE
|
||||
block_timestamp > current_date - 91
|
||||
GROUP BY
|
||||
seller, marketplace, nf_token_contract, sell_symbol, currency
|
||||
),
|
||||
buys AS (
|
||||
SELECT
|
||||
buyer AS user_address,
|
||||
marketplace,
|
||||
nft_collection AS nf_token_contract,
|
||||
count(distinct(nft_id)) AS n_nfts_bought,
|
||||
COALESCE(dp.symbol, SPLIT_PART(currency, '.', 2)) AS buy_symbol,
|
||||
currency,
|
||||
count(tx_id) AS n_buys,
|
||||
sum(ns.price) AS token_buy_volume,
|
||||
CASE
|
||||
WHEN currency IN (select currency FROM missing_prices)
|
||||
THEN sum(ns.price * 1)
|
||||
ELSE sum(ns.price * dp.price)
|
||||
END AS buy_usd_volume
|
||||
FROM
|
||||
flow.core.ez_nft_sales ns
|
||||
LEFT JOIN daily_prices dp ON date_trunc('day', ns.block_timestamp) = dp.day
|
||||
AND ns.currency = dp.token_contract
|
||||
WHERE
|
||||
block_timestamp > current_date - 91
|
||||
AND
|
||||
-- exclude pack sellers, allday and la liga
|
||||
seller NOT IN ('0xe4cf4bdc1751c65d', '0x87ca73a41bb50ad5')
|
||||
GROUP BY
|
||||
buyer, marketplace, nf_token_contract, buy_symbol, currency
|
||||
)
|
||||
|
||||
SELECT
|
||||
COALESCE(sells.user_address, buys.user_address) AS user_address,
|
||||
COALESCE(sells.marketplace, buys.marketplace) AS marketplace,
|
||||
COALESCE(sells.nf_token_contract, buys.nf_token_contract) AS nf_token_contract,
|
||||
COALESCE(buys.n_nfts_bought, 0) AS n_nfts_bought,
|
||||
COALESCE(sells.n_nfts_sold, 0) AS n_nfts_sold,
|
||||
SPLIT_PART(COALESCE(sells.nf_token_contract, buys.nf_token_contract), '.', 2) AS nft_project,
|
||||
COALESCE(sells.currency, buys.currency) AS token_contract,
|
||||
COALESCE(sells.sell_symbol, buys.buy_symbol) AS token_symbol,
|
||||
COALESCE(n_buys, 0) AS n_buys,
|
||||
COALESCE(token_buy_volume, 0) AS buy_token_volume,
|
||||
COALESCE(buy_usd_volume, 0) AS buy_usd_volume,
|
||||
COALESCE(n_sells, 0) AS n_sells,
|
||||
COALESCE(token_sell_volume, 0) AS sell_token_volume,
|
||||
COALESCE(sell_usd_volume, 0) AS sell_usd_volume
|
||||
FROM sells
|
||||
FULL OUTER JOIN buys ON sells.user_address = buys.user_address
|
||||
AND sells.marketplace = buys.marketplace
|
||||
AND sells.nf_token_contract = buys.nf_token_contract
|
||||
AND sells.currency = buys.currency")
|
||||
|
||||
|
||||
# # top x% y trader
|
||||
flowscored.metrics.w[, top_topshot_trader := round(runif(nrow(flowscored.metris.w)))]
|
||||
# list nft's
|
||||
listings <- QuerySnowflake("
|
||||
WITH listings AS (
|
||||
select
|
||||
event_data:seller::string AS user_address,
|
||||
count(tx_id) AS listings
|
||||
FROM flow.core.fact_events
|
||||
WHERE
|
||||
event_contract IN ('A.c1e4f4f4c4257510.TopShotMarketV3', 'A.c38aea683c0c4d38.Market')
|
||||
AND
|
||||
event_type = 'MomentListed'
|
||||
AND
|
||||
block_timestamp >= current_date - 91
|
||||
AND
|
||||
tx_succeeded = TRUE
|
||||
GROUP BY user_address
|
||||
|
||||
UNION
|
||||
|
||||
select
|
||||
event_data:storefrontAddress::string AS user_address,
|
||||
count(tx_id) AS listings
|
||||
FROM flow.core.fact_events
|
||||
WHERE
|
||||
event_contract IN ('A.4eb8a10cb9f87357.NFTStorefront', 'A.4eb8a10cb9f87357.NFTStorefrontV2')
|
||||
AND
|
||||
event_type = 'ListingAvailable'
|
||||
AND
|
||||
block_timestamp >= current_date - 91
|
||||
AND
|
||||
tx_succeeded = TRUE
|
||||
GROUP BY user_address
|
||||
|
||||
# 90 +ve profits
|
||||
flowscored.metrics.w[, positive_trader := round(runif(nrow(flowscored.metris.w)))]
|
||||
UNION
|
||||
|
||||
select
|
||||
event_data:seller::string AS user_address,
|
||||
count(tx_id) AS listings
|
||||
FROM flow.core.fact_events
|
||||
WHERE
|
||||
event_contract = 'A.85b075e08d13f697.OlympicPinMarket'
|
||||
AND
|
||||
event_type = 'PieceListed'
|
||||
AND
|
||||
block_timestamp >= current_date - 91
|
||||
AND
|
||||
tx_succeeded = TRUE
|
||||
GROUP BY user_address
|
||||
|
||||
)
|
||||
|
||||
SELECT
|
||||
user_address,
|
||||
sum(listings) AS n_listings
|
||||
FROM
|
||||
listings
|
||||
WHERE
|
||||
user_address NOT IN (SELECT account_address FROM FLOW.CORE.DIM_CONTRACT_LABELS)
|
||||
AND
|
||||
user_address NOT IN (SELECT address FROM FLIPSIDE_PROD_DB.CROSSCHAIN.ADDRESS_LABELS WHERE blockchain = 'flow')
|
||||
GROUP BY user_address
|
||||
")
|
||||
|
||||
# chain stakes:
|
||||
chain.stakes <- QuerySnowflake("
|
||||
WITH daily_prices AS (
|
||||
SELECT date_trunc('day', timestamp) AS day,
|
||||
AVG(price_usd) AS price
|
||||
FROM flow.core.fact_prices
|
||||
WHERE token_contract = 'A.1654653399040a61.FlowToken'
|
||||
GROUP BY day
|
||||
),
|
||||
|
||||
stakes AS (
|
||||
SELECT
|
||||
delegator AS user_address,
|
||||
count(tx_id) AS n_stakes,
|
||||
sum(amount) AS stake_token_volume,
|
||||
sum(amount * price) AS stake_usd_volume
|
||||
FROM FLOW.CORE.EZ_STAKING_ACTIONS sa
|
||||
JOIN daily_prices dp ON date_trunc('day', sa.block_timestamp) = dp.day
|
||||
WHERE
|
||||
block_timestamp >= current_date - 91
|
||||
AND
|
||||
action = 'DelegatorTokensCommitted'
|
||||
GROUP BY user_address
|
||||
),
|
||||
|
||||
unstakes AS (
|
||||
SELECT
|
||||
delegator AS user_address,
|
||||
count(tx_id) AS n_unstakes,
|
||||
sum(amount) AS unstake_token_volume,
|
||||
sum(amount * price) AS unstake_usd_volume
|
||||
FROM FLOW.CORE.EZ_STAKING_ACTIONS sa
|
||||
JOIN daily_prices dp ON date_trunc('day', sa.block_timestamp) = dp.day
|
||||
WHERE
|
||||
block_timestamp >= current_date - 91
|
||||
AND
|
||||
action = 'DelegatorUnstakedTokensWithdrawn'
|
||||
GROUP BY user_address
|
||||
)
|
||||
|
||||
SELECT
|
||||
coalesce(s.user_address, u.user_address) AS user_address,
|
||||
'flow' AS protocol,
|
||||
'A.16546533918040a61.FlowToken' AS token_contract,
|
||||
'FlowToken' AS token_symbol,
|
||||
COALESCE(n_stakes, 0) AS n_stakes,
|
||||
COALESCE(n_unstakes, 0) AS n_unstakes,
|
||||
COALESCE(stake_token_volume, 0) AS stake_token_volume,
|
||||
COALESCE(stake_usd_volume, 0) AS stake_usd_volume,
|
||||
COALESCE(unstake_token_volume, 0) AS unstake_token_volume,
|
||||
COALESCE(unstake_usd_volume, 0) AS unstake_usd_volume
|
||||
FROM stakes s
|
||||
FULL OUTER JOIN unstakes u ON s.user_address = u.user_address
|
||||
|
||||
")
|
||||
|
||||
|
||||
save(flowscored.metrics.w, file = "~/user_metrics/apps/flow/flowscored/data.RData")
|
||||
setwd("~/user_metrics/apps/flow/flowscored/")
|
||||
dex.swaps <- QuerySnowflake("
|
||||
WITH daily_prices AS (
|
||||
SELECT
|
||||
symbol,
|
||||
token_contract,
|
||||
date_trunc('day', timestamp) AS day,
|
||||
AVG(price_usd) AS price
|
||||
FROM flow.core.fact_prices
|
||||
WHERE timestamp > current_date - 91
|
||||
GROUP BY symbol, token_contract, day
|
||||
),
|
||||
sells AS (
|
||||
SELECT
|
||||
trader AS user_address,
|
||||
symbol,
|
||||
swap_contract,
|
||||
token_out_contract AS token_contract,
|
||||
count(tx_id) AS n_sells,
|
||||
sum(token_out_amount) AS token_sell_volume,
|
||||
sum(token_out_amount * price) AS usd_sell_volume
|
||||
FROM
|
||||
flow.core.ez_swaps ds
|
||||
LEFT JOIN daily_prices dp ON date_trunc('day', ds.block_timestamp) = dp.day
|
||||
AND ds.token_out_contract = dp.token_contract
|
||||
WHERE
|
||||
block_timestamp > current_date - 91
|
||||
GROUP BY
|
||||
trader, swap_contract, symbol, token_out_contract
|
||||
),
|
||||
buys AS (
|
||||
SELECT
|
||||
trader AS user_address,
|
||||
symbol,
|
||||
swap_contract,
|
||||
token_in_contract AS token_contract,
|
||||
count(tx_id) AS n_buys,
|
||||
sum(token_in_amount) AS token_buy_volume,
|
||||
sum(token_in_amount * price) AS usd_buy_volume
|
||||
FROM
|
||||
flow.core.ez_swaps ds
|
||||
LEFT JOIN daily_prices dp ON date_trunc('day', ds.block_timestamp) = dp.day
|
||||
AND ds.token_in_contract = dp.token_contract
|
||||
WHERE
|
||||
block_timestamp > current_date - 91
|
||||
GROUP BY
|
||||
trader, swap_contract, symbol, token_in_contract
|
||||
)
|
||||
|
||||
SELECT
|
||||
COALESCE(sells.user_address, buys.user_address) AS user_address,
|
||||
COALESCE(sells.swap_contract, buys.swap_contract) AS protocol,
|
||||
COALESCE(sells.token_contract, buys.token_contract) AS token_contract,
|
||||
COALESCE(sells.symbol, buys.symbol) AS token_symbol,
|
||||
COALESCE(n_buys, 0) AS n_buys,
|
||||
COALESCE(n_sells, 0) AS n_sells,
|
||||
COALESCE(token_buy_volume, 0) AS buy_token_volume,
|
||||
COALESCE(usd_buy_volume, 0) AS buy_usd_volume,
|
||||
COALESCE(token_sell_volume, 0) AS sell_token_volume,
|
||||
COALESCE(usd_sell_volume, 0) AS sell_usd_volume
|
||||
FROM sells
|
||||
FULL OUTER JOIN buys ON sells.user_address = buys.user_address
|
||||
AND sells.swap_contract = buys.swap_contract
|
||||
AND sells.token_contract = buys.token_contract
|
||||
")
|
||||
|
||||
activity <- QuerySnowflake("
|
||||
--user_address | n_txn | n_days_active | days_since_last_txn | n_contracts
|
||||
SELECT
|
||||
proposer AS user_address,
|
||||
count(tx_id) AS n_txn,
|
||||
count(distinct(date_trunc('day', block_timestamp))) AS n_days_active,
|
||||
DATEDIFF('days', date_trunc('day', max(block_timestamp)), current_date) AS last_txn,
|
||||
0 AS n_complex_txn,
|
||||
0 AS n_contracts
|
||||
FROM flow.core.fact_transactions
|
||||
WHERE
|
||||
block_timestamp >= current_date - 91
|
||||
AND
|
||||
tx_succeeded = TRUE
|
||||
AND
|
||||
proposer NOT IN (SELECT account_address FROM FLOW.CORE.DIM_CONTRACT_LABELS)
|
||||
AND
|
||||
proposer NOT IN (SELECT address FROM FLIPSIDE_PROD_DB.CROSSCHAIN.ADDRESS_LABELS WHERE blockchain = 'flow')
|
||||
GROUP BY
|
||||
proposer
|
||||
")
|
||||
|
||||
|
||||
if(FALSE) {
|
||||
# floats (p2e/dapps/games)
|
||||
# claim float FLOATClaimed
|
||||
# create float event FLOATEventCreated
|
||||
dapper.to.blocto <- QuerySnowflake("
|
||||
with account_creations as (
|
||||
SELECT
|
||||
tx_id, event_data:address::string AS user_address
|
||||
FROM
|
||||
flow.core.fact_events
|
||||
WHERE
|
||||
event_type = 'AccountCreated'
|
||||
),
|
||||
dapper_wals AS (
|
||||
select
|
||||
ft.tx_id, block_timestamp, user_address, proposer
|
||||
from flow.core.fact_transactions ft
|
||||
JOIN account_creations ac ON ft.tx_id = ac.tx_id
|
||||
where proposer = '0x18eb4ee6b3c026d2'),
|
||||
|
||||
# flovatar builder
|
||||
# build a flowvatar
|
||||
dapper_wdraws AS (
|
||||
select
|
||||
tx_id, block_timestamp, event_contract, event_data:from::string AS xfer_from
|
||||
from flow.core.fact_events
|
||||
where
|
||||
event_type = 'Withdraw'
|
||||
and
|
||||
event_data:from::string IN (select user_address from dapper_wals)
|
||||
)
|
||||
|
||||
# incrementFi
|
||||
select
|
||||
count(fe.tx_id) AS n_xfers,
|
||||
date_trunc('month', fe.block_timestamp) AS month,
|
||||
min(fe.block_timestamp) AS min_time,
|
||||
fe.event_contract,
|
||||
xfer_from,
|
||||
event_data:to::string AS xfer_to
|
||||
--event_data:id::number AS nft_id
|
||||
|
||||
# lp
|
||||
# need all of the pairs!
|
||||
# "TokensDeposited", "TokensWithdrawn"
|
||||
# should be made by 0xb063c16cac85dbd1
|
||||
# router is 0xa6850776a94e6551
|
||||
from flow.core.fact_events fe
|
||||
join dapper_wdraws dw ON fe.tx_id = dw.tx_id AND fe.event_contract = dw.event_contract
|
||||
where
|
||||
event_type = 'Deposit'
|
||||
and
|
||||
event_data:to::string NOT IN (select user_address from dapper_wals)
|
||||
and
|
||||
fe.tx_id NOT IN (select tx_id FROM flow.core.ez_nft_sales)
|
||||
group by month, fe.event_contract, xfer_from, xfer_to
|
||||
")
|
||||
|
||||
dapper.to.blocto <- unique(dapper.to.blocto[xfer_from %notin% flow.contracts$account_address &
|
||||
xfer_to %notin% flow.contracts$account_address &
|
||||
substr(xfer_from, 1, 2) == "0x" &
|
||||
substr(xfer_to, 1, 2) == "0x"])
|
||||
froms.tos <- dapper.to.blocto[, .N, by = "xfer_from,xfer_to"]
|
||||
|
||||
# # farmDONE
|
||||
# flow.contracts[account_address == "0x1b77ba4b414de352"]
|
||||
# all.contracts.events[event_contract == "A.1b77ba4b414de352.Staking"]
|
||||
# "TokenStaked"
|
||||
# "TokenUnstaked"
|
||||
|
||||
|
||||
# lend/borrow
|
||||
c("Borrow", "Supply", "Repay", "Redeem")
|
||||
# FLOW
|
||||
"0x7492e2f9b4acea9a"
|
||||
#fUSD
|
||||
"0x90f55b24a556ea45"
|
||||
#USDC
|
||||
"0x8334275bda13b2be"
|
||||
#BLT
|
||||
"0x67539e86cbe9b261"
|
||||
|
||||
# stake FLOW (does this double count though?)
|
||||
flow.contracts[account_address == "0xd6f80565193ad727"]
|
||||
all.contracts.events[event_contract == "A.d6f80565193ad727.LiquidStaking"]
|
||||
# LiquidStaking
|
||||
"0xd6f80565193ad727"
|
||||
# "Stake" "Unstake"
|
||||
|
||||
|
||||
# flowty!!
|
||||
all.contracts.events[str_detect(tolower(event_contract), "flowty")][order(event_contract, event_type)]
|
||||
|
||||
A.5c57f79c6694797f.Flowty
|
||||
# list nft ListingAvailable, ListingCompleted (?)
|
||||
# user = lister
|
||||
|
||||
# get funding (FundingAvailable, FundingSettled)
|
||||
# lister, funder
|
||||
# repay funding FundingRepaid
|
||||
# lister, funder
|
||||
|
||||
# list rental ListingAvailable
|
||||
# lister
|
||||
# rent ListingRented
|
||||
# lister, renter
|
||||
# return RentalReturned
|
||||
# lister, renter
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# what do I want?
|
||||
|
||||
# basic actions by wallet creator:
|
||||
|
||||
chain.stakes <- merge(chain.stakes,
|
||||
wallet.creations[user_address %in% chain.stakes$user_address,
|
||||
list(user_address, wallet_creator)],
|
||||
by = "user_address", all.x = TRUE, all.y = FALSE)
|
||||
|
||||
dex.swaps <- merge(dex.swaps,
|
||||
wallet.creations[user_address %in% dex.swaps$user_address,
|
||||
list(user_address, wallet_creator)],
|
||||
by = "user_address", all.x = TRUE, all.y = FALSE)
|
||||
|
||||
nft.trades <- merge(nft.trades,
|
||||
wallet.creations[user_address %in% nft.trades$user_address,
|
||||
list(user_address, wallet_creator)],
|
||||
by = "user_address", all.x = TRUE, all.y = FALSE)
|
||||
|
||||
|
||||
token.accumulation <- merge(token.accumulation,
|
||||
wallet.creations[user_address %in% token.accumulation$user_address,
|
||||
list(user_address, wallet_creator)],
|
||||
by = "user_address", all.x = TRUE, all.y = FALSE)
|
||||
|
||||
letsee <- rbind(
|
||||
token.accumulation[, list(wallet_creator, user_address, what = 'tokenstuff')],
|
||||
chain.stakes[, list(wallet_creator, user_address, what = 'stakeflow')],
|
||||
dex.swaps[, list(wallet_creator, user_address, what = 'swap')],
|
||||
nft.trades[, list(wallet_creator, user_address, what = 'tradenft')])
|
||||
|
||||
data.table::dcast(letsee, wallet_creator ~ what, value.var = "user_address", fun.aggregate = uniqueN)
|
||||
|
||||
|
||||
nft.trades[wallet_creator == "blocto", .N, by = "marketplace,nf_token_contract"][order(-N)]
|
||||
|
||||
froms.tos[, n_froms := uniqueN(xfer_from), by = xfer_to]
|
||||
froms.tos <- froms.tos[n_froms == 1]
|
||||
|
||||
dapper.to.blocto <- dapper.to.blocto[xfer_from %in% froms.tos$xfer_from]
|
||||
|
||||
|
||||
|
||||
|
||||
user.stats <- merge(pack.rips[, list(n_rips = sum(n_rips)), by = user_address],
|
||||
listings,
|
||||
by = "user_address", all = TRUE)
|
||||
|
||||
user.stats <- merge(user.stats,
|
||||
nft.sales[nf_token_contract %in% c('A.0b2a3299cc857e29.TopShot', 'A.e4cf4bdc1751c65d.AllDay', 'A.329feb3ab062d289.UFC_NFT', 'A.87ca73a41bb50ad5.Golazos'),
|
||||
list(n_nft_buys_dapper = sum(n_buys)), by = user_address],
|
||||
by = "user_address", all = TRUE)
|
||||
|
||||
user.stats <- merge(user.stats,
|
||||
nft.sales[!(nf_token_contract %in%
|
||||
c('A.0b2a3299cc857e29.TopShot', 'A.e4cf4bdc1751c65d.AllDay',
|
||||
'A.329feb3ab062d289.UFC_NFT', 'A.87ca73a41bb50ad5.Golazos',
|
||||
'A.e4cf4bdc1751c65d.PackNFT', 'A.87ca73a41bb50ad5.PackNFT')),
|
||||
list(n_nft_trades_nd = sum(n_buys) + sum(n_sells),
|
||||
n_nft_projects_nd = uniqueN(nf_token_contract)), by = user_address],
|
||||
by = "user_address", all = TRUE)
|
||||
|
||||
user.stats <- merge(user.stats,
|
||||
chain.stakes[, list(n_stakes = sum(n_stakes)), by = user_address],
|
||||
by = "user_address", all = TRUE)
|
||||
|
||||
user.stats <- merge(user.stats,
|
||||
dex.swaps[, list(n_swaps = sum(n_buys) + sum(n_sells)), by = user_address],
|
||||
by = "user_address", all = TRUE)
|
||||
|
||||
user.stats <- user.stats[user_address != "null" & (
|
||||
n_rips > 0 | n_listings > 0 | n_nft_buys_dapper > 0 | n_nft_trades_nd > 0 | n_nft_projects_nd > 0 | n_stakes > 0
|
||||
)]
|
||||
|
||||
ReplaceValues(user.stats)
|
||||
|
||||
user.stats[n_rips > 0 | n_listings > 0 | n_nft_buys_dapper > 0]
|
||||
|
||||
jackf1 <- c("0x69a1f5cefd1e0fdf", "0xcf3ead0e195bdd0f")
|
||||
angeal <- c("0xc04f0af1dab0a999", "0x52eceb884aa542c6")
|
||||
jackf2 <- c("0xcc17b1ed3d9b079c", "0x60787d9233b782ad")
|
||||
|
||||
|
||||
user.stats[user_address %in% angeal]
|
||||
user.stats[user_address %in% jackf1]
|
||||
user.stats[user_address %in% jackf2]
|
||||
|
||||
|
||||
|
||||
|
||||
froms.tos$N <- NULL
|
||||
froms.tos$n_froms <- NULL
|
||||
setnames(froms.tos, c("dapper", "blocto"))
|
||||
|
||||
paste(paste(paste0("d_", names(user.stats)[2:9]), " = ", names(user.stats)[2:9]), collapse = ", ")
|
||||
paste(paste(paste0("b_", names(user.stats)[2:9]), " = ", names(user.stats)[2:9]), collapse = ", ")
|
||||
|
||||
letsee <- merge(froms.tos,
|
||||
user.stats[, list(dapper = user_address, d_n_rips = n_rips, d_n_listings = n_listings, d_n_nft_buys_dapper = n_nft_buys_dapper, d_n_nft_trades_nd = n_nft_trades_nd, d_n_nft_projects_nd = n_nft_projects_nd, d_n_stakes = n_stakes, d_n_swaps = n_swaps, d_n_txn = n_txn)],
|
||||
by = "dapper", all.x = TRUE, all.y = FALSE)
|
||||
|
||||
letsee <- merge(letsee,
|
||||
user.stats[, list(blocto = user_address, b_n_rips = n_rips, b_n_listings = n_listings, b_n_nft_buys_dapper = n_nft_buys_dapper, b_n_nft_trades_nd = n_nft_trades_nd, b_n_nft_projects_nd = n_nft_projects_nd, b_n_stakes = n_stakes, b_n_swaps = n_swaps, b_n_txn = n_txn)],
|
||||
by = "blocto", all.x = TRUE, all.y = FALSE)
|
||||
|
||||
|
||||
user.stats[n_rips > 1]
|
||||
user.stats[n_rips > 5]
|
||||
user.stats[n_rips > 10]
|
||||
|
||||
user.stats[n_listings > 1]
|
||||
user.stats[n_listings > 5]
|
||||
user.stats[n_listings > 10]
|
||||
|
||||
user.stats[n_nft_buys_dapper > 1]
|
||||
user.stats[n_nft_buys_dapper > 5]
|
||||
user.stats[n_nft_buys_dapper > 10]
|
||||
|
||||
# bonus
|
||||
user.stats[n_nft_trades_nd > 0]
|
||||
user.stats[n_stakes > 0]
|
||||
user.stats[n_swaps > 0]
|
||||
|
||||
dual.address.set <- froms.tos
|
||||
|
||||
save(user.stats, dual.address.set, file = "data.RData")
|
||||
|
||||
dual.address.set <- dual.address.set[dapper %in% user.stats$user_address |
|
||||
blocto %in% user.stats$user_address]
|
||||
|
||||
user.stats[user_address %in% c("0x92435b7fc135685e", "0x773712e39665ad6a")]
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 22 KiB |
@ -1,3 +0,0 @@
|
||||
<svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5.46407 9.10678C5.70682 9.51136 6.29318 9.51137 6.53593 9.10678L11.4321 0.94656C11.682 0.529982 11.3819 0 10.8961 0H1.10387C0.618059 0 0.317989 0.529982 0.567936 0.94656L5.46407 9.10678Z" fill="#F3A712"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 318 B |
@ -1,13 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 19 19" style="enable-background:new 0 0 19 19;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;}
|
||||
</style>
|
||||
<path class="st0" d="M9.5,17.5c-0.6,0-1.2-0.2-1.7-0.5c-1.2-0.7-2.8-1.6-4-2.3C2.6,14.1,2,13,2,11.8V7.2c0-1.2,0.7-2.3,1.7-3
|
||||
c1.2-0.7,2.8-1.6,4-2.3c1.1-0.6,2.4-0.6,3.5,0c1.2,0.7,2.8,1.6,4,2.3c0.5,0.3,0.9,0.7,1.2,1.2l-5.3,3.1c-1,0.6-1.7,1.8-1.7,2.9V17.5
|
||||
z M17,11v0.8c0,1.2-0.7,2.3-1.7,3c-1.2,0.7-2.8,1.6-4,2.3c-0.1,0.1-0.2,0.1-0.3,0.2v-1.4c0-0.7,0.4-1.4,1-1.8c1.5-0.9,3-1.7,4.6-2.6
|
||||
C16.7,11.3,16.8,11.2,17,11z M17,6.8c0,0.1,0,0.3,0,0.4V8c0,0.9-0.5,1.7-1.3,2.2c-1.5,0.9-3,1.7-4.6,2.6c-0.1,0.1-0.2,0.1-0.3,0.2
|
||||
v-1.6c0-0.7,0.4-1.4,1-1.8L17,6.8z"/>
|
||||
</svg>
|
||||
<?xml version="1.0" encoding="UTF-8"?><svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 97 103.03"><defs><style>.cls-1{fill-rule:evenodd;}</style></defs><path class="cls-1" d="M48.5,103.03c-3.9,0-7.7-1-11.2-2.9-7.8-4.4-18.2-10.3-26.1-14.8-6.9-3.9-11.2-11.2-11.2-19v-29.6c0-7.8,4.3-15.1,11.2-19,7.8-4.4,18.2-10.3,26.1-14.8,6.9-3.9,15.4-3.9,22.4,0,7.8,4.4,18.2,10.3,26.1,14.8,3.4,1.9,6.1,4.6,8,7.7l-34.2,19.7c-6.8,3.9-11,11.3-11.1,18.9v39Zm48.4-41.9v5.1c0,7.8-4.3,15.1-11.2,19-7.8,4.4-18.2,10.3-26.1,14.8-.7,.4-1.5,.8-2.2,1.1v-9.2c0-4.6,2.6-9,6.5-11.3,9.8-5.7,19.6-11.2,29.4-16.9,1.3-.7,2.5-1.6,3.6-2.6Zm-.1-27.2c.1,.9,.2,1.9,.2,2.8v5.3c0,5.8-3.2,11.2-8.2,14.1-9.8,5.7-19.6,11.2-29.4,16.9-.7,.4-1.3,.8-1.9,1.3v-10.3c0-4.6,2.6-9.1,6.6-11.4l32.7-18.7Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 987 B After Width: | Height: | Size: 772 B |
|
Before Width: | Height: | Size: 10 KiB |
110
apps/flow/flowscored/www/flowscored_logo.svg
Normal file
@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 27.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 637 157.1" style="enable-background:new 0 0 637 157.1;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{display:none;}
|
||||
.st1{display:inline;}
|
||||
.st2{fill:#00EF8B;}
|
||||
.st3{fill:#FFFFFF;}
|
||||
.st4{fill:#16FF99;}
|
||||
</style>
|
||||
<g id="Layer_2" class="st0">
|
||||
<path class="st1" d="M206.9,74.6h-9.4v35.2h-13.2V74.6h-6.8V63.3h6.8v-4.4c0-11.4,7.1-17.2,17.9-17.2c1.7,0,3.4,0.2,5,0.6v13.2
|
||||
c-1.4-0.6-2.9-0.9-4.5-0.9c-2.6-0.2-4.9,1.8-5.2,4.4c0,0.2,0,0.5,0,0.7v3.5h9.4L206.9,74.6z M226.8,109.8h-13.3V42.6h13.3V109.8z"
|
||||
/>
|
||||
<path class="st1" d="M256.4,60.3c13.9,0,25.3,11.3,25.3,25.2s-11.3,25.3-25.2,25.3c-13.9,0-25.3-11.3-25.3-25.2v-0.1
|
||||
c-0.2-13.7,10.8-25,24.5-25.2C255.9,60.3,256.1,60.3,256.4,60.3z M256.4,97.9c6.8,0,11.7-5.6,11.7-12.4s-4.9-12.3-11.7-12.3
|
||||
c-6.8,0-11.8,5.5-11.8,12.3S249.7,97.9,256.4,97.9z"/>
|
||||
<path class="st1" d="M295.5,61.3l8.6,32.2l8.6-25.6l-2.3-6.6h13.1l11.2,32.2l8.4-32.2h13.7l-14.4,48.5h-13.8L319,83.2l-9,26.6
|
||||
h-13.9l-14.3-48.5L295.5,61.3z"/>
|
||||
<path class="st1" d="M365.8,92.7c5-0.1,9.1,3.8,9.2,8.8c0,0.1,0,0.3,0,0.4c0.1,4.9-3.8,8.9-8.7,9c-0.2,0-0.3,0-0.5,0
|
||||
c-4.8,0.1-8.9-3.7-9-8.5c0-0.2,0-0.3,0-0.5c-0.2-4.9,3.6-9,8.5-9.2C365.5,92.7,365.7,92.7,365.8,92.7z"/>
|
||||
<path class="st1" d="M417.9,108.6c-3.4,1.5-7.1,2.3-10.8,2.3c-15.5,0-25.8-11.2-25.8-25.5S391.6,60,407.1,60
|
||||
c3.7,0,7.4,0.8,10.8,2.3v14.2c-3.2-2.2-6.9-3.3-10.8-3.3c-6.8,0.2-12.2,5.9-12,12.7c0.2,6.6,5.5,11.9,12,12c3.9,0,7.6-1.2,10.8-3.5
|
||||
V108.6z"/>
|
||||
<path class="st1" d="M449.4,60.1c14,0,25.4,11.3,25.5,25.4s-11.3,25.4-25.4,25.5S424.1,99.7,424,85.6v-0.1
|
||||
c-0.2-13.8,10.8-25.2,24.6-25.4C448.9,60.1,449.1,60.1,449.4,60.1z M449.4,97.9c6.9,0,11.8-5.7,11.8-12.4s-4.9-12.3-11.8-12.3
|
||||
s-11.8,5.6-11.8,12.3S442.6,97.9,449.4,97.9z"/>
|
||||
<path class="st1" d="M496.4,66.9c2.7-4.3,7.4-6.9,12.4-6.8c6.9,0,12.3,3.1,15,8.8c2.3-5,7.1-8.8,14.4-8.8c9.4,0,16.8,7.4,16.8,17.9
|
||||
v31.8h-13.3v-28c0-5.5-3.1-8.7-7.8-8.7s-8.1,3.2-8.1,8.7v28h-13.3v-28c0-5.5-3.1-8.7-7.8-8.7s-7.8,2.9-8.1,8v28.7h-13.3V61.1h13.3
|
||||
v5.8H496.4z"/>
|
||||
</g>
|
||||
<g id="Layer_1">
|
||||
<circle class="st2" cx="78.5" cy="74.7" r="73.2"/>
|
||||
<rect x="90" y="63.3" class="st3" width="20.7" height="20.7"/>
|
||||
<path class="st3" d="M69.3,91.7c0,4.3-3.5,7.8-7.8,7.8s-7.8-3.5-7.8-7.8s3.5-7.8,7.8-7.8l0,0h7.8V63.3h-7.7
|
||||
c-15.7,0-28.4,12.7-28.4,28.4s12.7,28.4,28.4,28.4S90,107.4,90,91.7v-7.8H69.3V91.7z"/>
|
||||
<path class="st3" d="M97.7,52.9H121V32.3H97.7C82,32.3,69.3,45,69.3,60.7v2.6H90v-2.6C90,56.4,93.5,52.9,97.7,52.9z"/>
|
||||
<polygon class="st4" points="69.3,83.9 90,83.9 90,83.9 90,63.3 90,63.3 69.3,63.3 "/>
|
||||
<path d="M204.6,61h-9.2v35.8h-12.9V61h-6.7V49.5h6.7V45c0-11.6,6.9-17.5,17.5-17.5c1.5,0,3.9,0.3,4.8,0.6v13.5
|
||||
c-1-0.5-2.9-0.9-4.4-0.9c-3.2,0-5,2.2-5,5.2v3.6h9.2V61z M224,96.8h-13V28.5h13V96.8z"/>
|
||||
<path d="M255,46.5c13.9,0,24.6,11.2,24.6,25.6c0,14.5-10.7,25.7-24.6,25.7c-13.9,0-24.6-11.3-24.6-25.7
|
||||
C230.4,57.7,241.1,46.5,255,46.5z M255,84.7c6.7,0,11.4-5.7,11.4-12.6c0-6.8-4.8-12.5-11.4-12.5c-6.6,0-11.5,5.6-11.5,12.5
|
||||
C243.5,79,248.4,84.7,255,84.7z"/>
|
||||
<path d="M294,47.5l8.4,32.8l8.4-26l-2.3-6.7h12.8l11,32.8l8.2-32.8h13.4l-14.1,49.3h-13.5l-9.4-27l-8.7,27h-13.6l-14-49.3H294z"/>
|
||||
<path d="M385.6,61.5c-2.9-1.9-7.1-3.3-10.4-3.3s-4.7,1.7-4.7,3.6c0,1.6,1,2.4,2.8,3.6l6.8,4.2c5.7,3.6,7.8,8.2,7.8,13.4
|
||||
c0,8.5-6.1,15-17.4,15c-4.3,0-9-1-12.4-2.5V82c2.2,2,7.6,4.4,11.4,4.4c3.3,0,4.9-1.6,4.9-3.7c0-1.6-0.9-2.9-3.1-4.3l-7.4-4.5
|
||||
c-4.9-3-6.8-7.8-6.8-12.7c0-8.7,6.5-14.8,17.6-14.8c3.5,0,7.8,0.7,10.8,1.7V61.5z"/>
|
||||
<path d="M429.4,95.5c-2.7,1.5-7.2,2.4-10.5,2.4c-15,0-25-11.3-25-25.7c0-14.6,10-25.6,25-25.6c3.1,0,7.8,0.9,10.5,2.3v14.3
|
||||
c-2.5-1.8-6.1-3.4-10.5-3.4c-6.9,0-11.9,5.6-11.9,12.5c0,6.8,4.9,12.6,11.9,12.6c4.3,0,8.1-1.6,10.5-3.5V95.5z"/>
|
||||
<path d="M459.2,46.5c13.9,0,24.6,11.2,24.6,25.6c0,14.5-10.7,25.7-24.6,25.7s-24.6-11.3-24.6-25.7
|
||||
C434.6,57.7,445.3,46.5,459.2,46.5z M459.2,84.7c6.7,0,11.4-5.7,11.4-12.6c0-6.8-4.8-12.5-11.4-12.5c-6.6,0-11.5,5.6-11.5,12.5
|
||||
C447.7,79,452.7,84.7,459.2,84.7z"/>
|
||||
<path d="M506.1,52.9c2.3-3.7,5.9-6.3,11.2-6.3c1,0,2.7,0.1,3.7,0.3v14.4c-1.8-0.9-4.1-1.5-6.9-1.5c-4.6,0-7.7,3.3-8,8.5v28.6h-12.9
|
||||
V47.5h12.9V52.9z"/>
|
||||
<path d="M537.5,76.4c1.1,5.6,5.9,9.3,12.5,9.3c5.9,0,11.8-1.8,16.1-4.7v13c-4.2,2.3-10.3,3.9-17.1,3.9c-14.1,0-24.4-10.4-24.4-25.7
|
||||
c0-14.5,10-25.6,23.7-25.6s22.1,10.7,22.1,23.5c0,2.1-0.4,4.9-0.8,6.4H537.5z M537.5,66.2h20.4c-0.2-5-4.3-8.5-9.8-8.5
|
||||
C542.4,57.7,538.2,61.6,537.5,66.2z"/>
|
||||
<path d="M612.7,90.5c-3.3,4.7-8.5,7.4-14.5,7.4c-13.4,0-22.4-11.3-22.4-25.7c0-14.5,9-25.6,22.5-25.6c6.1,0,11.1,2.7,14.4,7.3V28.5
|
||||
h12.9v68.3h-12.9V90.5z M600.9,59.8c-6.7,0-11.9,5.6-11.9,12.4c0,6.7,5.1,12.5,11.9,12.5c6.8,0,11.8-5.7,11.8-12.5
|
||||
C612.7,65.4,607.7,59.8,600.9,59.8z"/>
|
||||
<g>
|
||||
<path d="M445.8,141.6V111h4.1v30.6H445.8z M456.2,142c-1.6,0-3-0.4-4.3-1.2s-2.4-1.9-3.2-3.4s-1.2-3-1.2-4.8c0-0.1,0-0.1,0-0.1
|
||||
c0,0,0-0.1,0-0.1l2.4-0.1c0,0,0,0.1,0,0.1c0,0,0,0.1,0,0.1c0,1.1,0.3,2,0.8,2.9c0.5,0.9,1.2,1.5,2.1,2c0.9,0.5,1.8,0.7,2.7,0.7
|
||||
c1.6,0,2.9-0.6,4-1.7c1.1-1.1,1.6-2.9,1.6-5.3c0-2.4-0.5-4.1-1.6-5.3c-1.1-1.1-2.4-1.7-4.1-1.7c-1,0-1.9,0.2-2.7,0.7
|
||||
c-0.9,0.5-1.5,1.2-2.1,2c-0.5,0.8-0.8,1.8-0.8,2.9l-2.4-0.1c0-1.8,0.4-3.4,1.2-4.8c0.8-1.4,1.9-2.5,3.2-3.3s2.8-1.2,4.3-1.2
|
||||
c1.6,0,3.1,0.4,4.5,1.2c1.4,0.8,2.5,2,3.3,3.6c0.8,1.6,1.3,3.5,1.3,5.8c0,2.3-0.4,4.3-1.2,5.9s-1.9,2.8-3.3,3.7
|
||||
C459.4,141.6,457.9,142,456.2,142z"/>
|
||||
<path d="M469.3,150.4c-0.5,0-1,0-1.5-0.1c-0.4-0.1-0.7-0.1-0.8-0.2v-3.5c0.2,0.1,0.4,0.1,0.8,0.2c0.4,0.1,0.8,0.1,1.2,0.1
|
||||
c0.7,0,1.4-0.2,1.9-0.5c0.5-0.3,1-0.7,1.4-1.3c0.4-0.6,0.7-1.2,0.9-1.9l0.5-1.6l-6.9-20.9h4.2l5.1,17.6h-0.5l5-17.6h4.2l-7.2,22.3
|
||||
c-0.4,1.4-1,2.6-1.6,3.7c-0.6,1.1-1.5,2-2.6,2.6C472.4,150.1,471,150.4,469.3,150.4z"/>
|
||||
<path d="M499.5,141.6v-17.2h-4.3v-3.5h4.3v-2.3c0-1.1,0.1-2,0.4-2.9c0.3-0.8,0.6-1.6,1.1-2.2c0.5-0.6,1-1.1,1.6-1.5
|
||||
s1.3-0.7,2.1-0.9s1.5-0.3,2.4-0.3c0.7,0,1.2,0,1.6,0.1c0.4,0.1,0.6,0.2,0.8,0.2v3.5c-0.2-0.1-0.4-0.1-0.8-0.2
|
||||
c-0.4-0.1-0.8-0.1-1.2-0.1c-0.8,0-1.5,0.1-2,0.4c-0.5,0.2-0.9,0.6-1.2,1s-0.5,0.9-0.6,1.5c-0.1,0.6-0.2,1.2-0.2,1.8v1.8h5.7v3.5
|
||||
h-5.7v17.2H499.5z M516.9,111v30.6h-4V111H516.9z"/>
|
||||
<path d="M524.1,116.5c-0.7,0-1.3-0.2-1.8-0.6s-0.8-0.9-0.8-1.7c0-0.7,0.3-1.2,0.8-1.6s1.1-0.6,1.8-0.6c0.7,0,1.3,0.2,1.8,0.6
|
||||
s0.8,0.9,0.8,1.6c0,0.7-0.3,1.3-0.8,1.7S524.8,116.5,524.1,116.5z M522.1,141.6v-20.8h4v20.8H522.1z"/>
|
||||
<path d="M531.1,150.1v-29.3h4.1v29.3H531.1z M541.6,142c-1.6,0-3-0.4-4.3-1.2s-2.4-1.9-3.2-3.4s-1.2-3-1.2-4.8c0-0.1,0-0.1,0-0.1
|
||||
c0,0,0-0.1,0-0.1l2.4-0.1c0,0,0,0.1,0,0.1c0,0,0,0.1,0,0.1c0,1.1,0.3,2,0.8,2.9c0.5,0.9,1.2,1.5,2.1,2c0.9,0.5,1.8,0.7,2.7,0.7
|
||||
c1.6,0,2.9-0.6,4-1.7c1.1-1.1,1.6-2.9,1.6-5.3c0-2.4-0.5-4.1-1.6-5.3c-1.1-1.1-2.4-1.7-4.1-1.7c-1,0-1.9,0.2-2.7,0.7
|
||||
c-0.9,0.5-1.5,1.2-2.1,2c-0.5,0.8-0.8,1.8-0.8,2.9l-2.4-0.1c0-1.8,0.4-3.4,1.2-4.8c0.8-1.4,1.9-2.5,3.2-3.3s2.8-1.2,4.3-1.2
|
||||
c1.6,0,3.1,0.4,4.5,1.2c1.4,0.8,2.5,2,3.3,3.6c0.8,1.6,1.3,3.5,1.3,5.8c0,2.3-0.4,4.3-1.2,5.9s-1.9,2.8-3.3,3.7
|
||||
C544.8,141.6,543.3,142,541.6,142z"/>
|
||||
<path d="M562.7,142c-1.2,0-2.3-0.1-3.4-0.4c-1.1-0.3-2-0.7-2.8-1.2c-0.8-0.5-1.4-1.2-1.9-2c-0.4-0.8-0.7-1.7-0.7-2.7
|
||||
c0-0.1,0-0.2,0-0.3c0-0.1,0-0.2,0-0.2h4.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.2c0,1,0.4,1.7,1.3,2.2c0.8,0.5,2,0.7,3.4,0.7
|
||||
c0.9,0,1.6-0.1,2.3-0.3c0.7-0.2,1.3-0.5,1.7-0.8s0.6-0.9,0.6-1.4c0-1-0.4-1.6-1.3-2c-0.9-0.4-2.2-0.8-4.1-1.1
|
||||
c-1-0.2-1.9-0.4-2.9-0.7c-0.9-0.3-1.7-0.7-2.5-1.1c-0.7-0.5-1.3-1.1-1.7-1.8c-0.4-0.7-0.6-1.6-0.6-2.6c0-1.3,0.4-2.4,1.1-3.3
|
||||
s1.8-1.6,3-2.1c1.3-0.5,2.7-0.7,4.2-0.7c1.5,0,2.9,0.3,4.1,0.8c1.3,0.5,2.3,1.2,3.1,2.2c0.8,0.9,1.2,2.1,1.2,3.5
|
||||
c0,0.1,0,0.1,0,0.2s0,0.1,0,0.2h-4c0-0.1,0-0.1,0-0.1s0-0.1,0-0.1c0-0.7-0.2-1.2-0.6-1.7c-0.4-0.4-0.9-0.8-1.6-1
|
||||
c-0.7-0.2-1.4-0.3-2.1-0.3c-0.7,0-1.4,0.1-2,0.2s-1.2,0.4-1.7,0.8c-0.5,0.4-0.7,0.8-0.7,1.5c0,0.6,0.2,1.1,0.7,1.5
|
||||
c0.4,0.4,1.1,0.7,1.9,0.9s1.7,0.5,2.8,0.7c1,0.2,1.9,0.4,2.9,0.7s1.8,0.6,2.5,1.1c0.7,0.5,1.3,1,1.8,1.8s0.7,1.6,0.7,2.6
|
||||
c0,1.1-0.2,2-0.7,2.8s-1.1,1.4-1.9,1.9c-0.8,0.5-1.8,0.9-2.8,1.2S563.8,142,562.7,142z"/>
|
||||
<path d="M577.6,116.5c-0.7,0-1.3-0.2-1.8-0.6s-0.8-0.9-0.8-1.7c0-0.7,0.3-1.2,0.8-1.6s1.1-0.6,1.8-0.6c0.7,0,1.3,0.2,1.8,0.6
|
||||
s0.8,0.9,0.8,1.6c0,0.7-0.3,1.3-0.8,1.7S578.3,116.5,577.6,116.5z M575.6,141.6v-20.8h4v20.8H575.6z"/>
|
||||
<path d="M592.9,142c-1.6,0-3.1-0.4-4.5-1.2c-1.4-0.8-2.5-2-3.3-3.7c-0.8-1.6-1.2-3.6-1.2-5.9c0-2.3,0.4-4.2,1.3-5.8
|
||||
c0.8-1.6,1.9-2.8,3.3-3.6c1.4-0.8,2.9-1.2,4.5-1.2c1.6,0,3,0.4,4.3,1.2s2.4,1.9,3.2,3.3c0.8,1.4,1.2,3,1.2,4.8c0,0.1,0,0.1,0,0.1
|
||||
s0,0.1,0,0.1l-2.4,0.1c0,0,0-0.1,0-0.1s0-0.1,0-0.1c0-1.1-0.3-2-0.8-2.9c-0.5-0.8-1.2-1.5-2.1-2c-0.9-0.5-1.8-0.7-2.7-0.7
|
||||
c-1.6,0-3,0.6-4.1,1.7c-1.1,1.1-1.6,2.9-1.6,5.3c0,2.4,0.5,4.1,1.6,5.3c1.1,1.1,2.4,1.7,4,1.7c1,0,1.9-0.2,2.8-0.8
|
||||
c0.9-0.5,1.5-1.2,2-2.1c0.5-0.9,0.8-1.9,0.8-3l2.4,0.1c0,1.8-0.4,3.4-1.2,4.9c-0.8,1.4-1.8,2.6-3.2,3.4S594.5,142,592.9,142z
|
||||
M599.3,141.6V111h4.1v30.6H599.3z"/>
|
||||
<path d="M609.7,132.7v-3.3h14.7l-0.6,1c0-0.1,0-0.2,0-0.2s0-0.2,0-0.2c0-1.1-0.2-2-0.7-2.9c-0.4-0.9-1.1-1.6-2-2.2
|
||||
c-0.9-0.5-2-0.8-3.3-0.8c-1.3,0-2.4,0.3-3.4,0.9c-1,0.6-1.7,1.4-2.3,2.5c-0.5,1.1-0.8,2.3-0.8,3.8c0,1.5,0.3,2.8,0.8,3.9
|
||||
c0.5,1.1,1.3,1.9,2.3,2.5c1,0.6,2.2,0.9,3.5,0.9c1,0,1.8-0.1,2.5-0.3c0.7-0.2,1.3-0.5,1.7-0.8c0.5-0.3,0.8-0.7,1-1.1
|
||||
c0.2-0.4,0.4-0.8,0.4-1.2h4.1c-0.1,0.8-0.3,1.7-0.8,2.5c-0.5,0.8-1.1,1.6-1.9,2.2c-0.8,0.7-1.8,1.2-3,1.6
|
||||
c-1.2,0.4-2.6,0.6-4.1,0.6c-2.1,0-3.9-0.5-5.5-1.4s-2.8-2.2-3.7-3.8s-1.3-3.5-1.3-5.6c0-2.1,0.4-4,1.3-5.6s2.1-2.9,3.7-3.8
|
||||
c1.6-0.9,3.4-1.4,5.4-1.4c2.1,0,3.9,0.5,5.4,1.4c1.5,0.9,2.7,2.2,3.5,3.8c0.8,1.6,1.2,3.4,1.2,5.5c0,0.2,0,0.5,0,0.9
|
||||
c0,0.3,0,0.5-0.1,0.7H609.7z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 9.6 KiB |
1
apps/flow/flowscored/www/github.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg width="98" height="96" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" fill="#24292f"/></svg>
|
||||
|
After Width: | Height: | Size: 963 B |
|
Before Width: | Height: | Size: 12 KiB |
1
apps/flow/flowscored/www/random.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><svg id="Layer_3" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 78 66"><defs><style>.cls-1{stroke:#000;stroke-width:2px;}</style></defs><path class="cls-1" d="M30.43,32.92c-1.03-1.13-2.04-2.24-3.05-3.34-3.71-4.06-7.43-8.1-11.13-12.17-.67-.74-1.4-1.09-2.4-1.08-3.19,.03-6.38,.01-9.57,0-.44,0-.89-.02-1.3-.13-.98-.27-1.59-1.19-1.5-2.16,.09-.98,.85-1.84,1.86-1.85,3.7-.03,7.41-.09,11.1,.07,2.17,.09,3.91,1.29,5.38,2.9,4.12,4.53,8.26,9.04,12.39,13.55,.32,.35,.65,.7,1.04,1.12,.45-.48,.86-.93,1.27-1.38,3.98-4.36,7.97-8.7,11.93-13.08,1.96-2.16,4.35-3.25,7.28-3.22,4.21,.04,8.43,.01,12.64,.01,.36,0,.71,0,1.39,0-.48-.39-.73-.62-1-.82-2.68-1.92-5.36-3.84-8.05-5.75-.8-.57-1.15-1.33-.93-2.29,.2-.87,.79-1.46,1.67-1.52,.54-.04,1.19,.11,1.63,.42,4.79,3.37,9.56,6.78,14.32,10.2,1.45,1.04,1.45,2.6,0,3.64-4.76,3.42-9.53,6.83-14.31,10.22-1.14,.81-2.41,.64-3.11-.35-.71-1.02-.45-2.21,.71-3.04,2.62-1.88,5.24-3.75,7.86-5.63,.31-.23,.61-.47,1.09-.84-.53-.03-.84-.07-1.15-.07-4.29,0-8.58,.04-12.86-.02-1.67-.02-2.91,.53-4.03,1.78-4.2,4.7-8.49,9.32-12.74,13.98-.24,.27-.48,.54-.77,.88,.86,.95,1.69,1.86,2.52,2.78,3.79,4.14,7.58,8.26,11.35,12.42,.82,.9,1.78,1.41,2.97,1.41,4.83,.01,9.67,0,14.75,0-.38-.32-.59-.53-.83-.7-2.71-1.95-5.42-3.88-8.13-5.83-1.04-.75-1.31-1.79-.78-2.78,.47-.88,1.47-1.3,2.43-.99,.27,.09,.53,.24,.77,.41,4.75,3.38,9.49,6.75,14.22,10.15,1.45,1.04,1.47,2.6,.03,3.64-4.79,3.45-9.59,6.87-14.4,10.28-1.07,.76-2.33,.56-3.02-.39-.72-1.01-.47-2.21,.69-3.04,2.62-1.88,5.24-3.75,7.86-5.63,.32-.23,.64-.47,1.16-.86-.56-.03-.9-.07-1.24-.07-4.18,0-8.36-.02-12.53,0-3,.02-5.48-1.02-7.5-3.26-4.11-4.54-8.25-9.04-12.38-13.56-.25-.27-.5-.53-.83-.87-.3,.32-.57,.6-.84,.88-4.11,4.49-8.25,8.95-12.31,13.48-2.05,2.29-4.51,3.39-7.56,3.33-2.82-.05-5.64,0-8.47-.01-1.55,0-2.55-.86-2.53-2.13,.02-1.25,.96-2.04,2.48-2.04,3.23,0,6.45-.02,9.68,0,1.07,0,1.87-.37,2.59-1.17,4.46-4.91,8.95-9.79,13.43-14.68,.22-.24,.42-.49,.7-.81Z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
1
apps/flow/flowscored/www/shape_backgrounds-01.svg
Normal file
|
After Width: | Height: | Size: 451 KiB |
1
apps/flow/flowscored/www/shape_backgrounds-02.svg
Normal file
|
After Width: | Height: | Size: 91 KiB |
1
apps/flow/flowscored/www/shape_backgrounds-03.svg
Normal file
|
After Width: | Height: | Size: 93 KiB |
1
apps/flow/flowscored/www/shape_backgrounds-04.svg
Normal file
|
After Width: | Height: | Size: 108 KiB |
1
apps/flow/flowscored/www/shape_backgrounds-05.svg
Normal file
|
After Width: | Height: | Size: 103 KiB |
1
apps/flow/flowscored/www/shape_backgrounds-06.svg
Normal file
|
After Width: | Height: | Size: 107 KiB |
1
apps/flow/flowscored/www/shape_backgrounds-07.svg
Normal file
|
After Width: | Height: | Size: 101 KiB |
@ -1,40 +1,70 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=Epilogue:wght@400;500;600;700&display=swap');
|
||||
|
||||
body {
|
||||
background-color: #10151A;
|
||||
background-color: white;
|
||||
padding-left: 10%;
|
||||
padding-right: 10%;
|
||||
color: #919EAB;
|
||||
font-family: 'Inter';
|
||||
color: black;
|
||||
font-family: Epilogue, sans-serif;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
letter-spacing: -.03em;
|
||||
}
|
||||
|
||||
hr {
|
||||
background: #10151A;
|
||||
opacity: 0.5;
|
||||
border: 1px solid #637381;
|
||||
width: 95%;
|
||||
.bold-title {
|
||||
font-size: 40px;
|
||||
line-height: 1.1em;
|
||||
font-weight: 600;
|
||||
letter-spacing: -.04em;
|
||||
}
|
||||
|
||||
.container-fluid {
|
||||
background-color: black;
|
||||
max-width: 700px;
|
||||
margin: 0 auto;
|
||||
height: 100%;
|
||||
padding-top: 52px;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
border-radius: 16px;
|
||||
background-color: transparent;
|
||||
margin-top: -5%;
|
||||
padding-bottom: 3%;
|
||||
padding-right: 5%;
|
||||
padding-left: 5%;
|
||||
margin-bottom: 30px;
|
||||
/* upper right icon links */
|
||||
#icons {
|
||||
display: flex;
|
||||
padding-top: 10px;
|
||||
padding-left: 30px;
|
||||
}
|
||||
|
||||
.actions {
|
||||
display: flex;
|
||||
}
|
||||
.aboutlinks {
|
||||
padding-left: 20px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.scoreholder {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: 900;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.centered {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
.scoretitle {
|
||||
font-size: 1.2em;
|
||||
font-weight: 600;
|
||||
}
|
||||
.score {
|
||||
font-size: 3em;
|
||||
font-weight: 900;
|
||||
}
|
||||
.scoresubtitle {
|
||||
font-size: 0.9em;
|
||||
min-height: 50px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
(function(f,b){if(!b.__SV){var e,g,i,h;window.mixpanel=b;b._i=[];b.init=function(e,f,c){function g(a,d){var b=d.split(".");2==b.length&&(a=a[b[0]],d=b[1]);a[d]=function(){a.push([d].concat(Array.prototype.slice.call(arguments,0)))}}var a=b;"undefined"!==typeof c?a=b[c]=[]:c="mixpanel";a.people=a.people||[];a.toString=function(a){var d="mixpanel";"mixpanel"!==c&&(d+="."+c);a||(d+=" (stub)");return d};a.people.toString=function(){return a.toString(1)+".people (stub)"};i="disable time_event track track_pageview track_links track_forms track_with_groups add_group set_group remove_group register register_once alias unregister identify name_tag set_config reset opt_in_tracking opt_out_tracking has_opted_in_tracking has_opted_out_tracking clear_opt_in_out_tracking start_batch_senders people.set people.set_once people.unset people.increment people.append people.union people.track_charge people.clear_charges people.delete_user people.remove".split(" ");
|
||||
for(h=0;h<i.length;h++)g(a,i[h]);var j="set set_once union unset remove delete".split(" ");a.get_group=function(){function b(c){d[c]=function(){call2_args=arguments;call2=[c].concat(Array.prototype.slice.call(call2_args,0));a.push([e,call2])}}for(var d={},e=["get_group"].concat(Array.prototype.slice.call(arguments,0)),c=0;c<j.length;c++)b(j[c]);return d};b._i.push([e,f,c])};b.__SV=1.2;e=f.createElement("script");e.type="text/javascript";e.async=!0;e.src="undefined"!==typeof MIXPANEL_CUSTOM_LIB_URL?
|
||||
MIXPANEL_CUSTOM_LIB_URL:"file:"===f.location.protocol&&"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\/\//)?"https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js":"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";g=f.getElementsByTagName("script")[0];g.parentNode.insertBefore(e,g)}})(document,window.mixpanel||[]);
|
||||
mixpanel.init("c48149996bde884c5132354e074fe9a8");
|
||||
mixpanel.track('Sign up');
|
||||
@ -1,3 +0,0 @@
|
||||
<svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5.46407 0.893223C5.70682 0.488636 6.29318 0.488635 6.53593 0.893222L11.4321 9.05344C11.682 9.47002 11.3819 10 10.8961 10H1.10387C0.618059 10 0.317989 9.47002 0.567936 9.05344L5.46407 0.893223Z" fill="#F3A712"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 324 B |
1
apps/flow/flowscored/www/wallet.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg class="svg-icon" style="width: 1em; height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M979.38285688 441.16571469a25.78285688 25.78285688 0 0 1 0.54857156 5.48571375v293.34857156a25.78285688 25.78285688 0 0 1-0.54857157 5.48571469v96.48c0 62.4-50.05714313 113.28-111.90857156 113.28H149.12a112.73142844 112.73142844 0 0 1-111.97714312-113.28V154.94857156C37.07428531 90.14857156 89.12 37.21142844 153.37142844 37.21142844h619.88571469c64.32 0 116.29714313 52.93714312 116.29714218 117.80571468v72.68571375h0.48c2.05714313 0 4.11428531 0.27428531 6.10285782 0.68571469a90.10285688 90.10285688 0 0 1 83.17714218 90.44571375v122.33142938z m-51.42857157 324.54857062H622.60571469c-57.05142844 0-129.94285688-80.64-129.94285781-176.02285687 0-86.53714313 75.42857156-168.68571469 129.94285781-168.68571375h305.34857062v-102.17142938a38.60571469 38.60571469 0 0 0-37.98857062-39.15428531 52.11428531 52.11428531 0 0 1-7.33714313-0.54857156H149.6c-24 0-44.43428531-5.48571469-61.02857156-15.22285688v578.05714313c0 34.21714312 27.22285688 61.85142844 60.54857156 61.85142843h718.35428531a61.23428531 61.23428531 0 0 0 60.48-61.85142843V765.71428531z m0-51.42857062V472.43428531H622.60571469c-25.02857156 0-78.51428531 58.21714312-78.51428625 117.25714313 0 68.09142844 51.08571469 124.59428531 78.51428625 124.59428625h305.34857062zM88.43428531 161.87428531a25.64571469 25.64571469 0 0 1 1.98857156 9.80571469c0 33.25714312 19.33714313 56.02285688 59.17714313 56.02285688h688.45714313v-72.68571375a65.62285687 65.62285687 0 0 0-64.73142844-66.37714313H153.37142844a65.69142844 65.69142844 0 0 0-64.86857157 66.44571469v6.85714219z m617.82857156 465.46285782a35.65714313 35.65714313 0 1 1 0.06857157-71.31428625 35.65714313 35.65714313 0 0 1 0 71.31428625z" /></svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
@ -4,9 +4,12 @@ library(stringr)
|
||||
library(shinyWidgets)
|
||||
library(plotly)
|
||||
library(shinyjs)
|
||||
#install_github("dreamRs/capture")
|
||||
library(capture)
|
||||
library(shinyBS)
|
||||
library(shinycssloaders)
|
||||
# install_github("flipsidecrypto/user_metrics/apps/solana/solAttestR")
|
||||
library(solAttestR)
|
||||
|
||||
wheel.colors <- c("#30CFCF", "#A682EE", "#23D1BA", "#9764E8", "#3EAFE0", "#8880E5", "#26D994")
|
||||
|
||||
|
||||
@ -1,9 +1,12 @@
|
||||
function(input, output, session) {
|
||||
|
||||
output$useraddy <- renderUI({
|
||||
textInput("addy", "SOURCE ADDRESS:",
|
||||
placeholder = "paste in an address or click random")
|
||||
})
|
||||
connected.addy <- reactiveValues(addy = "connect wallet")
|
||||
|
||||
#observeEvent("sol_address")
|
||||
|
||||
# output$useraddy <- renderUI({
|
||||
# textInput("addy", "SOURCE ADDRESS:", value = connected.addy$addy)
|
||||
# })
|
||||
|
||||
|
||||
userRecord <- reactive({
|
||||
@ -11,7 +14,7 @@ function(input, output, session) {
|
||||
|
||||
if(nchar(input$addy) > 0) {
|
||||
|
||||
df[user_address == input$addy]
|
||||
df[user_address == input$addy]
|
||||
|
||||
} else {
|
||||
empty.df
|
||||
@ -19,11 +22,28 @@ function(input, output, session) {
|
||||
} else {
|
||||
empty.df
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
observeEvent(input$sol_address, {
|
||||
print(input$sol_address)
|
||||
if(input$sol_address != "") {
|
||||
|
||||
connected.addy$addy <- input$sol_address
|
||||
|
||||
# updateActionButton(session = session, inputId = "connect",
|
||||
# label = paste0("connected as ", substr(input$sol_address, 1, 7), "..."),
|
||||
# icon = character(0))
|
||||
# tmp <- data.table(address = input$sol_address,
|
||||
# time = Sys.time(),
|
||||
# score = userScore())
|
||||
# write.csv(tmp, file = paste0("/rstudio-data/optimistic-data/", input$eth_address, "_", Sys.time(), ".csv"), row.names = FALSE)
|
||||
|
||||
} else {
|
||||
|
||||
# updateActionButton(session = session, inputId = "connect",
|
||||
# icon = icon("wallet"), label = " Connect Wallet")
|
||||
}
|
||||
})
|
||||
|
||||
svgColored <- reactive({
|
||||
|
||||
@ -31,7 +51,7 @@ function(input, output, session) {
|
||||
|
||||
if(!is.null(input$addy)) {
|
||||
|
||||
if(nchar(input$addy) > 0) {
|
||||
if(nchar(input$addy) > 0 & input$addy != "connect wallet") {
|
||||
|
||||
new.style <- c()
|
||||
|
||||
|
||||
@ -11,9 +11,10 @@ fluidPage(
|
||||
tags$link(rel = "stylesheet", type = "text/css", href = "shiny.css"),
|
||||
tags$link(rel = "stylesheet", href = "https://fonts.googleapis.com/css?family=Orbitron"),
|
||||
tags$link(rel = "stylesheet", href = "https://fonts.googleapis.com/css?family=Exo+2"),
|
||||
tags$link(rel = "stylesheet", href = "https://fonts.googleapis.com/css?family=Roboto+Mono"),
|
||||
#tags$link(rel = "stylesheet", href = "https://fonts.googleapis.com/css?family=Roboto+Mono"),
|
||||
tags$script(src = "rudderstack.js"),
|
||||
tags$link(rel = "icon", href = "flipside.svg")
|
||||
),
|
||||
),
|
||||
|
||||
useShinyjs(),
|
||||
chooseSliderSkin("Round"),
|
||||
@ -47,14 +48,18 @@ fluidPage(
|
||||
placement = "bottom", trigger = "hover")
|
||||
|
||||
))),
|
||||
|
||||
fluidRow(class = "appbody",
|
||||
|
||||
fluidRow(class = "dashmid",
|
||||
column(7,
|
||||
div(class = "addybuttons",
|
||||
uiOutput("useraddy"),
|
||||
actionButton(inputId = "randomaddy", label = img(src = "random.svg", height = "26")),
|
||||
),
|
||||
#uiOutput("useraddy"),
|
||||
div(id = "sourceaddress", "SOURCE ADDRESS:"),
|
||||
SolWalletHandler("sol_address")
|
||||
),
|
||||
#actionButton(inputId = "randomaddy", label = img(src = "random.svg", height = "26")),
|
||||
|
||||
|
||||
div(id = "wheelpart",
|
||||
uiOutput("svgout") %>%
|
||||
|
||||
@ -47,7 +47,7 @@ a[title]:hover::after {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/* centering the address input + buttons */
|
||||
/* centering the address input + buttons
|
||||
.addybuttons {
|
||||
display: flex;
|
||||
margin: auto;
|
||||
@ -55,6 +55,24 @@ a[title]:hover::after {
|
||||
vertical-align: bottom;
|
||||
justify-content: center;
|
||||
}
|
||||
*/
|
||||
|
||||
.addybuttons {
|
||||
font-family: 'Exo 2';
|
||||
font-weight: 500;
|
||||
border: solid #E2E4F7 2px;
|
||||
border-radius: 8px;
|
||||
background-color: white;
|
||||
color: #56575E;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#sourceaddress {
|
||||
font-family: 'Orbitron';
|
||||
font-size: 13.6px;
|
||||
font-weight: 700;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
#useraddy label {
|
||||
font-family: 'Orbitron';
|
||||
@ -71,10 +89,40 @@ a[title]:hover::after {
|
||||
min-width: 400px;
|
||||
}
|
||||
|
||||
#sol_address {
|
||||
font-family: 'Orbitron';
|
||||
font-size: 13.6px;
|
||||
color: black;
|
||||
text-transform: capitalize;
|
||||
min-width: 400px;
|
||||
}
|
||||
|
||||
#sol_address:hover {
|
||||
background-color: #E2E4F7;
|
||||
}
|
||||
|
||||
.wallet-adapter-button-trigger {
|
||||
font-family: 'Exo 2';
|
||||
font-weight: 500;
|
||||
border: solid #E2E4F7 2px;
|
||||
border-radius: 8px;
|
||||
background-color: white;
|
||||
color: #56575E;
|
||||
text-transform: capitalize;
|
||||
max-height: 42px;
|
||||
line-height: 14px;
|
||||
min-width: 400px;
|
||||
}
|
||||
|
||||
.wallet-adapter-button-trigger:hover {
|
||||
background-color: #E2E4F7;
|
||||
}
|
||||
|
||||
.btn-default, .btn-default:focus {
|
||||
border: solid #E2E4F7 2px;
|
||||
border-radius: 8px;
|
||||
margin-top: auto;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.btn-default:hover {
|
||||
@ -114,19 +162,18 @@ a[title]:hover::after {
|
||||
border-radius: 8px;
|
||||
padding: 3px;
|
||||
background-color: #ffffff99;
|
||||
margin-top: 28px;
|
||||
padding-top: 15px;
|
||||
padding-bottom: 10px;
|
||||
|
||||
margin-top: 10px;
|
||||
}
|
||||
#botrightbox {
|
||||
border: 2px #E2E4F7 solid;
|
||||
border-radius: 8px;
|
||||
padding: 3px;
|
||||
background-color: #ffffff99;
|
||||
margin-top: 20px;
|
||||
padding-top: 15px;
|
||||
padding-bottom: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ DATEDIFF('days', date_trunc('day', max(block_timestamp)), current_date) AS last_
|
||||
0 AS n_contracts
|
||||
FROM flow.core.fact_transactions
|
||||
WHERE
|
||||
block_timestamp >= current_date - 180
|
||||
block_timestamp >= current_date - 91
|
||||
AND
|
||||
tx_succeeded = TRUE
|
||||
AND
|
||||
|
||||
@ -5,7 +5,7 @@ SELECT
|
||||
date_trunc('day', timestamp) AS day,
|
||||
AVG(price_usd) AS price
|
||||
FROM flow.core.fact_prices
|
||||
WHERE timestamp > current_date - 180
|
||||
WHERE timestamp > current_date - 91
|
||||
GROUP BY symbol, token_contract, day
|
||||
),
|
||||
sells AS (
|
||||
@ -22,7 +22,7 @@ sells AS (
|
||||
LEFT JOIN daily_prices dp ON date_trunc('day', ds.block_timestamp) = dp.day
|
||||
AND ds.token_out_contract = dp.token_contract
|
||||
WHERE
|
||||
block_timestamp > current_date - 180
|
||||
block_timestamp > current_date - 91
|
||||
GROUP BY
|
||||
trader, swap_contract, symbol, token_out_contract
|
||||
),
|
||||
@ -40,7 +40,7 @@ buys AS (
|
||||
LEFT JOIN daily_prices dp ON date_trunc('day', ds.block_timestamp) = dp.day
|
||||
AND ds.token_in_contract = dp.token_contract
|
||||
WHERE
|
||||
block_timestamp > current_date - 180
|
||||
block_timestamp > current_date - 91
|
||||
GROUP BY
|
||||
trader, swap_contract, symbol, token_in_contract
|
||||
)
|
||||
|
||||
43
sql/nfts/flow/nft_dapper_pack_rips.sql
Normal file
@ -0,0 +1,43 @@
|
||||
with wdraws AS (
|
||||
SELECT
|
||||
tx_id,
|
||||
event_data:from::string AS xfer_from,
|
||||
event_data:id::string AS nft_id
|
||||
FROM
|
||||
FLOW.CORE.fact_events
|
||||
where
|
||||
block_timestamp > current_date - 90
|
||||
AND
|
||||
tx_id not in (SELECT tx_id from flow.core.ez_nft_sales)
|
||||
AND
|
||||
event_type = 'Withdraw'
|
||||
AND
|
||||
(
|
||||
|
||||
(event_data:from = '0xe1f2a091f7bb5245' AND event_contract = 'A.0b2a3299cc857e29.TopShot')
|
||||
OR
|
||||
(event_data:from IN ('0xe4cf4bdc1751c65d', '0x44c6a6fd2281b6cc') AND event_contract = 'A.e4cf4bdc1751c65d.AllDay')
|
||||
OR
|
||||
(event_data:from IN ('0x87ca73a41bb50ad5', '0xb6f2481eba4df97b') AND event_contract = 'A.87ca73a41bb50ad5.Golazos')
|
||||
OR
|
||||
(event_data:from = '0x329feb3ab062d289' AND event_contract = 'A.329feb3ab062d289.UFC_NFT')
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
SELECT
|
||||
event_data:to::string AS user_address,
|
||||
event_contract AS nft_collection,
|
||||
count(fe.tx_id) AS n_rips,
|
||||
count(distinct(event_data:id::string)) AS n_nft_ids_ripped
|
||||
FROM
|
||||
FLOW.CORE.fact_events fe
|
||||
JOIN wdraws on fe.tx_id = wdraws.tx_id AND fe.event_data:id::string = wdraws.nft_id
|
||||
WHERE
|
||||
event_contract IN ('A.0b2a3299cc857e29.TopShot', 'A.e4cf4bdc1751c65d.AllDay', 'A.329feb3ab062d289.UFC_NFT', 'A.87ca73a41bb50ad5.Golazos')
|
||||
AND
|
||||
event_type = 'Deposit'
|
||||
GROUP BY
|
||||
user_address, nft_collection
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ sells AS (
|
||||
LEFT JOIN daily_prices dp ON date_trunc('day', ns.block_timestamp) = dp.day
|
||||
AND ns.currency = dp.token_contract
|
||||
WHERE
|
||||
block_timestamp > current_date - 180
|
||||
block_timestamp > current_date - 91
|
||||
GROUP BY
|
||||
seller, marketplace, nf_token_contract, sell_symbol, currency
|
||||
),
|
||||
@ -56,7 +56,7 @@ buys AS (
|
||||
LEFT JOIN daily_prices dp ON date_trunc('day', ns.block_timestamp) = dp.day
|
||||
AND ns.currency = dp.token_contract
|
||||
WHERE
|
||||
block_timestamp > current_date - 180
|
||||
block_timestamp > current_date - 91
|
||||
GROUP BY
|
||||
buyer, marketplace, nf_token_contract, buy_symbol, currency
|
||||
)
|
||||
|
||||