/tunnel

Leveraging Real World Assets to unlock more liquidity on Algorand.

Primary LanguageVue

TunnelFi

Unlock the full potential of your real-world assets in a secure, transparent, and inclusive financial ecosystem.

Netlify Status

Resources

Website | Dorahacks | Pitch Deck | Video | X | Email

Setting up relayer

git clone https://github.com/devarogundade/tunnel
cd relayer
npm install
touch .env

Add inside .env file

ALGO_PRIVATE_KEY="CONTACT US FOR THIS KEY"
EVM_PRIVATE_KEY="CONTACT US FOR THIS KEY"

Setup Spy node and Redis in docker then

npm run dev

Code Highlights

_wormhole.publishMessage{value: messageFee()}(
  _nonce,
  payload,
  CONSISTENCY_LEVEL
);
InnerTxnBuilder.Begin(),
InnerTxnBuilder.SetFields(
  {
    TxnField.type_enum: TxnType.Payment,
    TxnField.receiver: wormhole_addr.get(),
    TxnField.amount: mfee.get(),
    TxnField.fee: Int(0),
  }
),
InnerTxnBuilder.Next(),
InnerTxnBuilder.SetFields(
  {
    TxnField.type_enum: TxnType.ApplicationCall,
    TxnField.application_id: wormhole.get(),
    TxnField.application_args: [
       Bytes("publishMessage"),
       payload.load(),
       Itob(Int(0)),
    ],
    TxnField.accounts: [storage_addr.get()],
    TxnField.note: Bytes("publishMessage"),
    TxnField.fee: Int(0),
  }
),
InnerTxnBuilder.Submit(),
const app = new StandardRelayerApp<StandardRelayerContext>(
  Environment.TESTNET,
  {
    name: "TunnelRelayer",
    missedVaaOptions: {
      startingSequenceConfig: {
        "8": BigInt(1)
      }
    }
  },
);

Contract Ids

BSC

0x34795bA4E73954A4f6e6468eC45e4c2b287BB74c

ALGORAND

478376514

Flow Diagram

arch

Preview

Screenshot 2023-11-12 134727