mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 04:52:06 +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]
|
||||
[%set-management-proxy =ship =address]
|
||||
[%set-spawn-proxy =ship =address]
|
||||
[%set-voting-proxy =ship =address]
|
||||
[%set-transfer-proxy =ship =address]
|
||||
==
|
||||
::
|
||||
@ -323,8 +322,7 @@
|
||||
%7 =^(res batch take-escape `[[%detach res] batch])
|
||||
%8 =^(res batch take-ship-address `[[%set-management-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])
|
||||
%11 =^(res batch take-ship-address `[[%set-transfer-proxy res] batch])
|
||||
%10 =^(res batch take-ship-address `[[%set-transfer-proxy res] batch])
|
||||
==
|
||||
::
|
||||
:: Take a bite
|
||||
@ -659,7 +657,6 @@
|
||||
%detach (w-point process-detach +>.tx)
|
||||
%set-management-proxy (w-point process-set-management-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)
|
||||
==
|
||||
::
|
||||
@ -868,18 +865,6 @@
|
||||
:+ ~ [%point ship %spawn-proxy 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
|
||||
|= [=ship =point =address]
|
||||
?. ?& =(ship ship.from.tx)
|
||||
|
@ -193,11 +193,6 @@
|
||||
%^ sign-tx ship nonce
|
||||
(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
|
||||
|= [nonce=@ud =ship proxy=@tas =address] ^- @
|
||||
%^ sign-tx ship nonce
|
||||
@ -235,8 +230,7 @@
|
||||
%spawn %1
|
||||
%set-management-proxy %8
|
||||
%set-spawn-proxy %9
|
||||
%set-voting-proxy %10
|
||||
%set-transfer-proxy %11
|
||||
%set-transfer-proxy %10
|
||||
==
|
||||
%: can 3
|
||||
(from-proxy proxy)
|
||||
@ -371,15 +365,6 @@
|
||||
=^ f state (n state %bat (set-management-proxy:l2 0 ~marbud %own 0x123))
|
||||
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
|
||||
%+ expect-eq
|
||||
!> %spawn
|
||||
|
Loading…
Reference in New Issue
Block a user