New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@fuel-bridge/message-predicates

Package Overview
Dependencies
Maintainers
0
Versions
958
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fuel-bridge/message-predicates

Most messages sent from the base chain to Fuel will use a predicate as the message recipient. These predicates allow anyone to spend the `InputMessage` but verifies that a specific script is used in the transaction to ensure security and reliability that

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Fuel Bridge Message Predicates

Most messages sent from the base chain to Fuel will use a predicate as the message recipient. These predicates allow anyone to spend the InputMessage but verifies that a specific script is used in the transaction to ensure security and reliability that the message is handled appropriately.

Message to Contract Predicate

The Message to Contract Predicate is for messages that are trying to send a data payload to a designated Fuel contract. This predicate verifies that the script bytecode hash for the transaction matches for the designated Message to Contract Script and that there are no other InputMessages with data in the transaction other than the first input. If these conditions are met, then the predicate evaluates as true.

Message to Contract Script

The message to contract predicate relies on a script that performs only the following operation:

  • Call the function process_message on the contract with ID that matches the first 32 bytes in the message data field, while forwarding the exact amount of base asset specified in the InputMessage amount field

Building From Source

Building

Build:

pnpm forc build --release
cargo run --bin fuel-contract-message-predicate

Run tests:

cargo test

Contributing

Code must be formatted.

pnpm forc fmt
cargo fmt

License

The primary license for this repo is Apache 2.0, see LICENSE.

FAQs

Package last updated on 21 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc