Skip to content

About

Hashlock Markets HTLC escrow program on Solana (721JrU7NUvaRBSz3JGyuJQMZMgKrT28aonEGxzngMemf)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Hashlock Markets — Solana HTLC program

The escrow program behind Hashlock Markets on Solana: a hash time-locked contract for native SOL and SPL tokens. One escrow account per swap; the recipient, amount, fee and timelock are fixed when it is funded. claim pays the recipient against the sha256 preimage of the hashlock; after the timelock, refund returns the funds to the funder.

Program id: 721JrU7NUvaRBSz3JGyuJQMZMgKrT28aonEGxzngMemf (mainnet-beta and devnet). Audited by QuillAudits (three rounds).

Verify the deployed program

The program is built reproducibly in the Solana Foundation's verifiable-build image:

cargo install solana-verify
solana-verify build --base-image solanafoundation/solana-verifiable-build:4.2.2 \
  --library-name hashlock_htlc "$PWD"
solana-verify get-executable-hash target/deploy/hashlock_htlc.so
solana-verify get-program-hash -u mainnet-beta 721JrU7NUvaRBSz3JGyuJQMZMgKrT28aonEGxzngMemf

The two hashes are equal.

Tests

cargo test --locked --manifest-path programs/hashlock-htlc/Cargo.toml

The integration tests in programs/hashlock-htlc/tests run the built program (target/deploy/hashlock_htlc.so) in LiteSVM, so build first.

Layout

  • programs/hashlock-htlc/src/lib.rs — the program
  • idl/hashlock_htlc.json — its Anchor IDL
  • Cargo.lock — the pinned dependency set the build uses

License

MIT

About

Hashlock Markets HTLC escrow program on Solana (721JrU7NUvaRBSz3JGyuJQMZMgKrT28aonEGxzngMemf)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages