Giter Site home page Giter Site logo

Comments (5)

0xJurassicPunk avatar 0xJurassicPunk commented on July 17, 2024

For now, the consensus is just to have a single event with the msg.sender in it if one trade or more is executed.

from contracts-aggregator.

rob-looksrare avatar rob-looksrare commented on July 17, 2024

POC to get the function input parameters in java

    @Getter
    @AllArgsConstructor
    public static class TakerOrder extends DynamicStruct {
        Bool isOrderAsk;
        Address taker;
        Uint256 price;
        Uint256 tokenId;
        Uint256 minPercentageToAsk;
        DynamicBytes params;
    }

    @Getter
    @AllArgsConstructor
    public static class MakerOrder extends DynamicStruct {
        Bool isOrderAsk;
        Address signer;
        Address collection;
        Uint256 price;
        Uint256 tokenId;
        Uint256 amount;
        Address strategy;
        Address currency;
        Uint256 nonce;
        Uint256 startTime;
        Uint256 endTime;
        Uint256 minPercentageToAsk;
        DynamicBytes params;
        Uint8 v;
        Bytes32 r;
        Bytes32 s;
    }
    
    private static final org.web3j.abi.datatypes.Function MATCH_BID_WITH_TAKER_ASK =
            new org.web3j.abi.datatypes.Function("matchBidWithTakerAsk",
                    Collections.emptyList(),
                    Arrays.asList(
                            new TypeReference<TakerOrder>() {},
                            new TypeReference<MakerOrder>() {}
                    )
            );

    public void test() {
        EthTransaction ethTransaction = web3j.ethGetTransactionByHash("0x40a24bf63ade494c5ae34cfea7808305ab881c16cc92eee504f3cd916f940e23").send();
        Transaction transaction = ethTransaction.getResult();
        List<Type> types = FunctionReturnDecoder.decode(transaction.getInput().substring(10), MATCH_BID_WITH_TAKER_ASK.getOutputParameters());
    }

types array will contain the matchBidWithTakerAsk function input params as we can see here https://etherscan.io/tx/0x40a24bf63ade494c5ae34cfea7808305ab881c16cc92eee504f3cd916f940e23
image

from contracts-aggregator.

0xJurassicPunk avatar 0xJurassicPunk commented on July 17, 2024

Does it impact the indexing performance? @rob-looksrare

from contracts-aggregator.

rob-looksrare avatar rob-looksrare commented on July 17, 2024

Does it impact the indexing performance? @rob-looksrare

Based on gut feeling it does not impact the performance in a significant way, should be one extra call to rpc provider (did not do any tests regarding performance).

from contracts-aggregator.

0xJurassicPunk avatar 0xJurassicPunk commented on July 17, 2024

Hmmm, let's stick to the current specs where there is one event from the aggregator then. 🤔

from contracts-aggregator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.