mirror of
https://github.com/alexgo-io/stacks-pyth-bridge.git
synced 2026-01-12 16:53:22 +08:00
feat: commit wormhole to its trait
This commit is contained in:
@@ -16,6 +16,12 @@ path = 'contracts/deps/wormhole-core-v1.clar'
|
||||
clarity_version = 2
|
||||
epoch = 2.4
|
||||
|
||||
|
||||
[contracts.wormhole-core-trait]
|
||||
path = 'contracts/deps/wormhole-core-trait.clar'
|
||||
clarity_version = 2
|
||||
epoch = 2.4
|
||||
|
||||
[contracts.hk-cursor-v1]
|
||||
path = 'contracts/deps/hk-cursor-v1.clar'
|
||||
clarity_version = 2
|
||||
|
||||
19
contracts/deps/wormhole-core-trait.clar
Normal file
19
contracts/deps/wormhole-core-trait.clar
Normal file
@@ -0,0 +1,19 @@
|
||||
(define-trait wormhole-core-trait
|
||||
(
|
||||
;; Parse and Verify cryptographic validity of a VAA
|
||||
(parse-and-verify-vaa ((buff 2048)) (response {
|
||||
version: uint,
|
||||
guardian-set: uint,
|
||||
signatures-len: uint ,
|
||||
signatures: (list 19 { guardian-id: uint, signature: (buff 65) }),
|
||||
timestamp: uint,
|
||||
nonce: uint,
|
||||
emitter-chain: uint,
|
||||
sequence: uint,
|
||||
consistency-level: uint,
|
||||
payload: (buff 2048),
|
||||
guardians-public-keys: (list 19 { recovered-compressed-public-key: (response (buff 33) uint), guardian-id: uint }),
|
||||
vaa-body-hash: (buff 32),
|
||||
} uint))
|
||||
)
|
||||
)
|
||||
@@ -3,6 +3,11 @@
|
||||
;; Summary:
|
||||
;; Description:
|
||||
|
||||
;;;; Traits
|
||||
|
||||
;; Implements trait specified in wormhole-core-trait contract
|
||||
(impl-trait .wormhole-core-trait.wormhole-core-trait)
|
||||
|
||||
;;;; Constants
|
||||
|
||||
;; Generic error
|
||||
|
||||
Reference in New Issue
Block a user