Skip to content

Instantly share code, notes, and snippets.

View leeduckgo's full-sized avatar
💭
blockchain everyday

李大狗 leeduckgo

💭
blockchain everyday
View GitHub Profile
defmodule CodesOnChain.ReadmeAnalyzer do
@moduledoc """
analyze the readme of a repo.
functions:
- analyze_readme(text)
"""
def get_module_doc, do: @moduledoc
@leeduckgo
leeduckgo / CodesOnChain.Contracts.RMUDLottery.ex
Created February 10, 2024 09:18
CodesOnChain.Contracts.RMUDLottery.ex
defmodule CodesOnChain.Contracts.RMUDLottery do
@moduledoc """
the interact with RMUDLottery on mappo chain.
> https://mainnet.optimism.io
> 10
> https://explorer.optimism.io
"""
alias Ethereumex.HttpClient
alias Components.Transaction
@leeduckgo
leeduckgo / CodesOnChain.ArweaveUploader.ex
Last active January 24, 2024 05:06
CodesOnChain.ArweaveUploader.ex
defmodule CodesOnChain.ArweaveUploader do
alias Components.ArweaveHandler
@moduledoc """
generate map by a given hash.
"""
def get_module_doc, do: @moduledoc
def send_tx(api_key, data, tags) do
@leeduckgo
leeduckgo / ItemTagger.sol
Created January 8, 2024 07:38
MoveSpaceTaggerCollection
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/**
* @title ItemTagger v1.0.0
* @dev Implements tagger process along with judger.
*/
contract ItemTagger {
address public chairperson;
@leeduckgo
leeduckgo / CodesOnChain.Crypto.ex
Created December 29, 2023 05:44
CodesOnChain.Crypto.ex
defmodule CodesOnChain.Crypto do
@moduledoc """
the funcs about crypto
"""
def get_module_doc, do: @moduledoc
defdelegate verify_compact(msg, sig, addr), to: EthWallet
end
@leeduckgo
leeduckgo / CodesOnChain.Contracts.Bodhi.VectorTagger.ex
Last active April 29, 2024 13:21
CodesOnChain.Contracts.Bodhi
defmodule CodesOnChain.Contracts.Bodhi do
@moduledoc """
the interact with bodhi on op chain.
> https://mainnet.optimism.io
> 10
> https://explorer.optimism.io
"""
alias Ethereumex.HttpClient
alias Components.Transaction
require Logger
@leeduckgo
leeduckgo / CodesOnChain.GalxeInteractor.ex
Last active December 13, 2023 11:54
CodesOnChain.GalxeInteractor
defmodule CodesOnChain.GalxeInteractor do
@moduledoc """
Interact with Galxe.
"""
alias Components.GalxeGraphQLInteractor
def get_module_doc, do: @moduledoc
def query_campaign_list(the_alias, fir, aft) do
@leeduckgo
leeduckgo / CodesOnChain.DataPipeExample.ByLine.ex
Last active December 11, 2023 03:01
CodesOnChain.DataPipeExample
defmodule CodesOnChain.DataPipeExample.ByLine do
@moduledoc """
just split the markdown file by line.
"""
def get_module_doc(), do: @moduledoc
def handle(raw_data) do
String.split(raw_data, "\n")
end
@leeduckgo
leeduckgo / CodesOnChain.VectorAPI.ex
Last active December 21, 2023 07:38
CodesOnChain.VectorAPI
defmodule CodesOnChain.VectorAPI do
@moduledoc """
API for the Vector Datasets of Movespace.
> https://movespace.xyz
# TODO: record necessary data in local database.
# TODO: using embedbase surpase to auth.
"""
@leeduckgo
leeduckgo / CodesOnChain.MoveCrowdfund.ex
Last active June 3, 2023 09:47
CodesOnChain.MoveCrowdfund
defmodule CodesOnChain.MoveCrowdfund do
@moduledoc """
Weightlight backend for MoveCrowdfund.
"""
alias Web3SuiEx.Sui
@network "https://fullnode.testnet.sui.io:443"
@move_crowdfund_contract "0x928530ad292091fde082959ca7131f8b0f6209f8faf1a3fe8dc5ca86b2583acf"
@shared_fund_info "0x807b26a94f540b4164f5dd03acfb1fecf0c996db627945da4b2cd09ec3014a07"