• R/O
  • HTTP
  • SSH
  • HTTPS

equity: 提交

Based on BUTXO Programming Language


Commit MetaInfo

修订版f05780c18c0d34a2e4d993ef38d9c8a98d62e0c8 (tree)
时间2018-12-11 15:53:16
作者oysheng <33340252+oysheng@user...>
CommiterPaladz

Log Message

add contract LockPosition (#29)

* deposit contract FixedLimitCollect and FixedLimitProfit

* add contract LockPosition

* optimise

更改概述

差异

--- /dev/null
+++ b/compiler/equitytest/LockPosition
@@ -0,0 +1,9 @@
1+contract LockPosition(expireBlockHeight: Integer,
2+ saver: Program,
3+ publicKey: PublicKey) locks lockAmount of lockAsset {
4+ clause expire(sig: Signature) {
5+ verify above(expireBlockHeight)
6+ verify checkTxSig(publicKey, sig)
7+ lock lockAmount of lockAsset with saver
8+ }
9+}
--- a/compiler/equitytest/equity_test.go
+++ b/compiler/equitytest/equity_test.go
@@ -16,6 +16,10 @@ func TestCompileContract(t *testing.T) {
1616 want string
1717 }{
1818 {
19+ "./LockPosition",
20+ "cd9f697b7bae7cac6900c3c251547ac1",
21+ },
22+ {
1923 "./RepayCollateral",
2024 "557a641f0000007bcda069007b7b51547ac16951c3c251547ac1632a0000007bcd9f6900c3c251567ac1",
2125 },
Show on old repository browser