Git Product home page Git Product logo

Comments (10)

kaseLunt avatar kaseLunt commented on August 13, 2024

Having the same issue on Moonbeam

from fortune.

posix4e avatar posix4e commented on August 13, 2024

@kaseLunt @foufrix Do you see anything in the logs on the oracles?

from fortune.

vkomodey avatar vkomodey commented on August 13, 2024

Hey guys! Fortune is not multichain right now and can be configured via environment variables(backends). There are 2 ways of doing this:

  1. You deploy fortune to some free hosting(like heroku) for a particular blockchain(Moonbeam for example)
  2. Or we will add the multichain support and deploy it to some test network
  3. After proper contracts testing we will deploy fortune to the existing setup with some testnet

Personally I don't think that we need a multichain right now. New chain = new instance is the best way right now

from fortune.

posix4e avatar posix4e commented on August 13, 2024
  1. Agreed, no reason to change the source.
  2. It would be good to see a video and for you to share the environment variables. You can do this by forking the repo, and we will add a link in documentation to your fork
  3. Vlad provides a good example of using a free services like heroku. This will make the environment variables more clear

from fortune.

foufrix avatar foufrix commented on August 13, 2024

It's a bit complicated to deploy on heroku because they allow only one port, so it's always a different link and instance need to be deployed one by one, I'm not even sure it would work as reputation and recording oracles would not be on the same instance.

Anyway by running everything locally and changing constants.js to use contract on Polygon Mumbai and USDC for the moment, I manage to :

  1. launch app and create escrow interacting with contract on Mumbai
  2. Fund contract with USDC and provide manifest.json using only localhost
  3. Launching the exchange, trying to send Fortune Message over Polygon Mumbai, I get the same error as what I had when interacting with the AWS instance :
    image
    But this time I have the backend logs :
    image

After some search on this error, it can be cause by a wrong ABI.

I launched the exchange without docker to debug, and I see that there is an error when setting up the main escrow here :

  const setMainEscrow = async (address) => {
    setEscrow(address);
    console.log("address: ", address);
    const Escrow = new web3.eth.Contract(EscrowABI, address);
    console.log("1");
    const escrowSt = await Escrow.methods.status().call();
    console.log("2");
    setEscrowStatus(statusesMap[escrowSt]);

    const balance = await Escrow.methods.getBalance().call();
    setBalance(web3.utils.fromWei(balance, "ether"));
    console.log("3");

    const manifestUrl = await Escrow.methods.manifestUrl().call();
    if (manifestUrl) {
      const manifestContent = (await axios.get(manifestUrl)).data;

      setRecordingOracleUrl(manifestContent.recording_oracle_url);
    }
  };

And the logs on the frontend :
image

We see that the function crash directly at Escrow.methods.status().call()

Do you have any idea what need to be changed in /contracts/EscrowAbi.json to work with Polygon contract ?

from fortune.

vkomodey avatar vkomodey commented on August 13, 2024

Hey @foufrix . Let's replace the Escrow ABI with this implementation - https://github.com/humanprotocol/hmt-escrow/pull/295/files

It supports the standard ERC20 interface without bulk* methods

from fortune.

foufrix avatar foufrix commented on August 13, 2024

Hi, @vkomodey thanks for the help,

I deployed the contract of your branch polygon-escrow-bulk here: https://mumbai.polygonscan.com/address/0x5D65C42cF4a140863744889BAd07f246C0211754

I tried again, creating an Escrow and redoing everything, I still got the same error on the call of the oracle :
Front
image

Back
image

Is it my guess there may be a mismatch of networks?

Because the from : 0x61f9f0b31eacb420553da8bcc59dc617279731ac it's the oracle on local ganache and to : 0x4f7106aac91ca6d1e6fef1d6f114baeb7643cdf8 is the Escrow created on Polygon Mumbai

Can a local call from the oracle on ganache to the polygon network work? And maybe the code of the oracle is trying to reach the contract 0x4f7106aac91ca6d1e6fef1d6f114baeb7643cdf8 on ganache instead on polygon

from fortune.

vkomodey avatar vkomodey commented on August 13, 2024

Because the from : 0x61f9f0b31eacb420553da8bcc59dc617279731ac it's the oracle on local ganache and to : 0x4f7106aac91ca6d1e6fef1d6f114baeb7643cdf8 is the Escrow created on Polygon Mumbai

Are you trying this on the deployed playground? I mean, we definitely can't use current oracles deployed in the ganache setup

Can a local call from the oracle on ganache to the polygon network work?
Definitely not. Let me check this tomorrow

from fortune.

foufrix avatar foufrix commented on August 13, 2024

Are you trying this on the deployed playground? I mean, we definitely can't use current oracles deployed in the ganache setup

It's not on the AWS deployed ganache, but on a local ganache instance on my computer

I thought we could, I asked on the discord about that and it did not seem to be an issue.
So I need to deploy oracle as well on the polygon Mumbai network? But there is no .sol contract in reputation/recording-oracle

from fortune.

vkomodey avatar vkomodey commented on August 13, 2024

So I need to deploy oracle as well on the polygon Mumbai network?

Oracle is not a contract. It's EOA. You don't have to deploy anything here

from fortune.

Related Issues (19)

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.