mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 13:04:17 +03:00
naive: remove l2 set-voting-proxy
Since galaxies can't be on L2
This commit is contained in:
parent
176df1fc2a
commit
3e56e17a22
@ -195,7 +195,6 @@
|
|||||||
[%detach =ship parent=ship]
|
[%detach =ship parent=ship]
|
||||||
[%set-management-proxy =ship =address]
|
[%set-management-proxy =ship =address]
|
||||||
[%set-spawn-proxy =ship =address]
|
[%set-spawn-proxy =ship =address]
|
||||||
[%set-voting-proxy =ship =address]
|
|
||||||
[%set-transfer-proxy =ship =address]
|
[%set-transfer-proxy =ship =address]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
@ -323,8 +322,7 @@
|
|||||||
%7 =^(res batch take-escape `[[%detach res] batch])
|
%7 =^(res batch take-escape `[[%detach res] batch])
|
||||||
%8 =^(res batch take-ship-address `[[%set-management-proxy res] batch])
|
%8 =^(res batch take-ship-address `[[%set-management-proxy res] batch])
|
||||||
%9 =^(res batch take-ship-address `[[%set-spawn-proxy res] batch])
|
%9 =^(res batch take-ship-address `[[%set-spawn-proxy res] batch])
|
||||||
%10 =^(res batch take-ship-address `[[%set-voting-proxy res] batch])
|
%10 =^(res batch take-ship-address `[[%set-transfer-proxy res] batch])
|
||||||
%11 =^(res batch take-ship-address `[[%set-transfer-proxy res] batch])
|
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
:: Take a bite
|
:: Take a bite
|
||||||
@ -659,7 +657,6 @@
|
|||||||
%detach (w-point process-detach +>.tx)
|
%detach (w-point process-detach +>.tx)
|
||||||
%set-management-proxy (w-point process-set-management-proxy +>.tx)
|
%set-management-proxy (w-point process-set-management-proxy +>.tx)
|
||||||
%set-spawn-proxy (w-point process-set-spawn-proxy +>.tx)
|
%set-spawn-proxy (w-point process-set-spawn-proxy +>.tx)
|
||||||
%set-voting-proxy (w-point process-set-voting-proxy +>.tx)
|
|
||||||
%set-transfer-proxy (w-point process-set-transfer-proxy +>.tx)
|
%set-transfer-proxy (w-point process-set-transfer-proxy +>.tx)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
@ -868,18 +865,6 @@
|
|||||||
:+ ~ [%point ship %spawn-proxy address]~
|
:+ ~ [%point ship %spawn-proxy address]~
|
||||||
point(address.spawn-proxy.own address)
|
point(address.spawn-proxy.own address)
|
||||||
::
|
::
|
||||||
:: TODO: delete?
|
|
||||||
::
|
|
||||||
++ process-set-voting-proxy
|
|
||||||
|= [=ship =point =address]
|
|
||||||
?. ?& =(ship ship.from.tx)
|
|
||||||
|(=(%own proxy.from.tx) =(%vote proxy.from.tx))
|
|
||||||
==
|
|
||||||
(debug %bad-permission ~)
|
|
||||||
::
|
|
||||||
:+ ~ [%point ship %voting-proxy address]~
|
|
||||||
point(address.voting-proxy.own address)
|
|
||||||
::
|
|
||||||
++ process-set-transfer-proxy
|
++ process-set-transfer-proxy
|
||||||
|= [=ship =point =address]
|
|= [=ship =point =address]
|
||||||
?. ?& =(ship ship.from.tx)
|
?. ?& =(ship ship.from.tx)
|
||||||
|
@ -193,11 +193,6 @@
|
|||||||
%^ sign-tx ship nonce
|
%^ sign-tx ship nonce
|
||||||
(take-ship-address:bits %set-spawn-proxy ship proxy ship address)
|
(take-ship-address:bits %set-spawn-proxy ship proxy ship address)
|
||||||
::
|
::
|
||||||
++ set-voting-proxy
|
|
||||||
|= [nonce=@ud =ship proxy=@tas =address] ^- @
|
|
||||||
%^ sign-tx ship nonce
|
|
||||||
(take-ship-address:bits %set-voting-proxy ship proxy ship address)
|
|
||||||
::
|
|
||||||
++ set-transfer-proxy
|
++ set-transfer-proxy
|
||||||
|= [nonce=@ud =ship proxy=@tas =address] ^- @
|
|= [nonce=@ud =ship proxy=@tas =address] ^- @
|
||||||
%^ sign-tx ship nonce
|
%^ sign-tx ship nonce
|
||||||
@ -235,8 +230,7 @@
|
|||||||
%spawn %1
|
%spawn %1
|
||||||
%set-management-proxy %8
|
%set-management-proxy %8
|
||||||
%set-spawn-proxy %9
|
%set-spawn-proxy %9
|
||||||
%set-voting-proxy %10
|
%set-transfer-proxy %10
|
||||||
%set-transfer-proxy %11
|
|
||||||
==
|
==
|
||||||
%: can 3
|
%: can 3
|
||||||
(from-proxy proxy)
|
(from-proxy proxy)
|
||||||
@ -371,15 +365,6 @@
|
|||||||
=^ f state (n state %bat (set-management-proxy:l2 0 ~marbud %own 0x123))
|
=^ f state (n state %bat (set-management-proxy:l2 0 ~marbud %own 0x123))
|
||||||
management-proxy.own:(~(got by points.state) ~marbud)
|
management-proxy.own:(~(got by points.state) ~marbud)
|
||||||
::
|
::
|
||||||
++ test-l2-set-voting-proxy ^- tang
|
|
||||||
:: Only galaxies have voting proxies, and they aren't allowed on L2
|
|
||||||
%- expect-fail
|
|
||||||
|.
|
|
||||||
=| =^state:naive
|
|
||||||
=^ f state (init-marbud state)
|
|
||||||
=^ f state (n state %bat (set-voting-proxy:l2 0 ~marbud %own 0x123))
|
|
||||||
voting-proxy.own:(~(got by points.state) ~marbud)
|
|
||||||
::
|
|
||||||
++ test-l2-spawn-proxy-deposit ^- tang
|
++ test-l2-spawn-proxy-deposit ^- tang
|
||||||
%+ expect-eq
|
%+ expect-eq
|
||||||
!> %spawn
|
!> %spawn
|
||||||
|
Loading…
Reference in New Issue
Block a user