[ccpw id="39382"]

HomeCrypto NewsMarketHooks Add Smart Contract Functionality To XRP Ledger

Hooks Add Smart Contract Functionality To XRP Ledger

Date:

Written By:

Hooks add smart contract functionality to the XRP Ledger: ‘layer one’ custom code to influence the behavior and flow of transactions. Hooks are small, efficient pieces of code being defined on an XRPL account, allowing logic to be executed before and/or after XRPL transactions.


- Advertisement -

The XRP ledger is known and is being appreciated for its transaction throughput, speed and the low fees. Combined with available advanced transaction types like multi sign, escrows, payment channels and even a decentralized exchange (all on ledger, out of the box, without requiring smart contracts) the XRPL has a lot to offer businesses and (creative) developers.

Hooks add smart contract functionality to the XRP Ledger: ‘layer one’ custom code to influence the behavior and flow of transactions. Hooks are small, efficient pieces of code being defined on an XRPL account, allowing logic to be executed before and/or after XRPL transactions. These hooks can be really simple, like: “reject payments < 10 XRP”, or “for all outgoing payments, send 10% to my savings account” or more advanced.

- Advertisement -

By allowing hooks to not only execute efficient logic but also to store small, simple data objects, one could define a hook like: “for incoming payments transactions, check if the sending account is in a list maintained by another hook, and if present: reject the transaction”.

Hooks are deliberately not Turing-Complete. While often touted as the holy grail of smart contracts, Turing-Completeness is actually inappropriate for smart contracts.

Hooks are currently live on a public testnet. It’s time for testing, coding, having fun & breaking things, so a future amendment to add Hooks to the XRP Ledger livenet can be drafted with confidence, hopefully at the end of 2021.

Disclaimer: This content is informational and should not be considered financial advice. The views expressed in this article may include the author's personal opinions and do not reflect The Crypto Basic’s opinion. Readers are encouraged to do thorough research before making any investment decisions. The Crypto Basic is not responsible for any financial losses.

-Advertisement-

Author

Mark Brennan
Mark Brennanhttps://thecryptobasic.com/
Mark Brennan has been active in the cryptocurrency sector since 2014. His love and passion for the nascent industry drove him to develop interest in writing about important developments and updates about cryptocurrencies and blockchain. Brennan, who holds a Masters degree in Business Administration, learned about the potential of blockchain technology. Aside from crypto journalism, Brennan runs an education center, where he educates people about the asset class.

More from Author

Latest Stories

Guides