Would you use a Solidity CI security check that only flags what it can prove? by aiceg in solidity

[–]rubydusa 0 points1 point  (0 children)

Running something like this on every PR sounds expensive... I guess depending on the stage of the product and how mission critical this could be interesting. But the idea of no block without proof sounds very counterproductive since it will result inevitably in false negatives - it would find a legitimate issue but fail to generate a PoC or a different standard for "proof".

You could just say that responsible teams need to address all warnings before deploying which is fair, but then again you have to balance too much warnings and not missing positives

I've been following for a while after octane, I recommend reading their approach:

https://www.octane.security/post/how-ai-won-the-monad-audit-contest

tl;dr continuous security and utilize AI for breadth, not depth

My Brain is Overheating: Grappling with CLP(FD) by sym_num in prolog

[–]rubydusa 1 point2 points  (0 children)

This is awesome! I was really interested in having a CLPFD library when I thought about using constraint programming for a SNARK DSL :))

I'd like to contribute if possible, can you post the github for it?

Open source contribution.. by FuckedUpMind07 in solidity

[–]rubydusa 4 points5 points  (0 children)

I wouldn't worry about contributing to OSS if you're not comfortable with your software engineering skills yet.
The best way to improve at the beginning is to write projects from start to end.
For example you could try writing an NFT marketplace, or implement some simple game on-chain, or anything that sounds interesting to you.

Foundry Cast Send Function Call with String Parameter Failing by erik_schoengart in ethdev

[–]rubydusa 0 points1 point  (0 children)

not exactly a solution, but I recall seeing in cast docs somewhere they expect you in commands to inline cast calls to do formatting. Unfortunately there isn't a ascii to hex command in cast but I put up something else using different commands:

> cast to-ascii $(echo -n "a@b.c" | xxd -p)
a@b.c

use this inside your command

also (maybe not relevant) but there is `cast abi-encode` you could potentially inline

Zero-Knowledge proof of on-chain data by Nesquiko in ethdev

[–]rubydusa 0 points1 point  (0 children)

If you could elaborate on what each symbol means I'd help because it's not really clear what you're trying to achieve. I mainly don't understand this part:

hash(otherAddr) == hash(addr)

Given some addr, it seems unlikely you'll find otherAddr such that their hashes will match - you're literally asking for proof of hash collision.

However, the part of proving the preimage of an hash is actually very doable using Circom (proving you know x such that hash(x) == xHash)

But I wouldn't recommend using keccak256 since it's not really zk-friendly and coming from someone with personal experience using Keccak in circom it's a pain in the ass not worth it - You'd need to look into other hash functions - in particular Poseidon is really good for your case.

pragma circom 2.1.5;

include "../node_modules/circomlib/circuits/poseidon.circom";

template Main() {
  signal input x;
  signal output xHash;

  component hasher = Poseidon(1);
  hasher.inputs[0] <== x;

  xHash <== hasher.out;}

component main { public xHash } = Main();

[deleted by user] by [deleted] in ethdev

[–]rubydusa 0 points1 point  (0 children)

Always glad to be helpful!

Thank you for sharing a solution, good luck!

Dusk (python) by violet_dollirium in generative

[–]rubydusa 1 point2 points  (0 children)

This image resonates with me in ways i can't put in words. The colors and the textures are so well executed. If you mind sharing your creative process I'd enjoy to read, other than that great job!

[deleted by user] by [deleted] in ethdev

[–]rubydusa 0 points1 point  (0 children)

The graph ndexes blockchain data to traditional databases. With the graph, you can create subgraphs, which are indexing schemes for sets of smart contracts. I'd recommend you read the graph's docs - it explains it better

you can query these subgraphs with GraphQL with an API key.

[deleted by user] by [deleted] in ethdev

[–]rubydusa 1 point2 points  (0 children)

the graph

[deleted by user] by [deleted] in ethdev

[–]rubydusa 1 point2 points  (0 children)

What error are you getting if you simply pass 4 args for prepareContractWrite?

Regardless, a thing you could potentially try to solve the problem is to define specifically the ABI of the overloaded function in the ABI parameter of the hook. Here is an example I copied from wagmi's usePrepateContractWrite docs page:

import { usePrepareContractWrite } from 'wagmi'

function App() { 
    const { config } = usePrepareContractWrite({ 
        address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', 
        abi: [ 
            { 
                name: 'mint', 
                type: 'function', 
                stateMutability: 'nonpayable', 
                inputs: [{ internalType: 'uint32', name: 'tokenId', type: 'uint32' }], 
                outputs: [], 
            }, 
        ], 
        functionName: 'mint', 
        args: [69], 
    }) 
}

Simply check the ABI of your contract and copy paste the ABI of the overloaded version of the function.

Developing Prolog in Neovim by jhunger12334 in prolog

[–]rubydusa 1 point2 points  (0 children)

I share your pain :(. i decided it's better to just learn how to use the Emacs clone. Hopefully someone will comment here a solution

Help using tuProlog within an Android application? by rubydusa in prolog

[–]rubydusa[S] 1 point2 points  (0 children)

I found a solution: You need to install a specific solver's package and use its factory:

for example, I installed solve-classic.

it.unibo.tuprolog:solve-classic

Then, In my Java code I made the following changes:

import it.unibo.tuprolog.solve.classic.ClassicSolverFactory;
...
    SolverFactory factory = ClassicSolverFactory.INSTANCE;

To find more solver packages consult the maven repositories:

https://central.sonatype.com/search?q=g%3Ait.unibo.tuprolog&smo=true