From 9930ecd844c22e36805a37bc28cf9d932f6f47da Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 14 Jun 2024 12:44:25 +0300 Subject: [PATCH] innerring: use contracts from neofs-contract repository Now updating neofs-contract dependency will automatically update contracts, see https://github.com/nspcc-dev/neofs-contract/issues/384 Signed-off-by: Roman Khimov --- contracts/00-nns.manifest.json | 1 - contracts/00-nns.nef | Bin 7084 -> 0 bytes contracts/01-proxy.manifest.json | 1 - contracts/01-proxy.nef | Bin 794 -> 0 bytes contracts/02-audit.manifest.json | 1 - contracts/02-audit.nef | Bin 1409 -> 0 bytes contracts/03-netmap.manifest.json | 1 - contracts/03-netmap.nef | Bin 4631 -> 0 bytes contracts/04-balance.manifest.json | 1 - contracts/04-balance.nef | Bin 2951 -> 0 bytes contracts/05-reputation.manifest.json | 1 - contracts/05-reputation.nef | Bin 1344 -> 0 bytes contracts/06-neofsid.manifest.json | 1 - contracts/06-neofsid.nef | Bin 1618 -> 0 bytes contracts/07-container.manifest.json | 1 - contracts/07-container.nef | Bin 6459 -> 0 bytes contracts/08-alphabet.manifest.json | 1 - contracts/08-alphabet.nef | Bin 3998 -> 0 bytes contracts/contracts.go | 162 -------------------------- contracts/contracts_test.go | 130 --------------------- go.mod | 4 +- go.sum | 8 +- pkg/innerring/contracts.go | 4 +- 23 files changed, 8 insertions(+), 309 deletions(-) delete mode 100755 contracts/00-nns.manifest.json delete mode 100755 contracts/00-nns.nef delete mode 100755 contracts/01-proxy.manifest.json delete mode 100755 contracts/01-proxy.nef delete mode 100755 contracts/02-audit.manifest.json delete mode 100755 contracts/02-audit.nef delete mode 100755 contracts/03-netmap.manifest.json delete mode 100755 contracts/03-netmap.nef delete mode 100755 contracts/04-balance.manifest.json delete mode 100755 contracts/04-balance.nef delete mode 100755 contracts/05-reputation.manifest.json delete mode 100755 contracts/05-reputation.nef delete mode 100755 contracts/06-neofsid.manifest.json delete mode 100755 contracts/06-neofsid.nef delete mode 100755 contracts/07-container.manifest.json delete mode 100755 contracts/07-container.nef delete mode 100755 contracts/08-alphabet.manifest.json delete mode 100755 contracts/08-alphabet.nef delete mode 100644 contracts/contracts.go delete mode 100644 contracts/contracts_test.go diff --git a/contracts/00-nns.manifest.json b/contracts/00-nns.manifest.json deleted file mode 100755 index e83ced466b..0000000000 --- a/contracts/00-nns.manifest.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"NameService","abi":{"methods":[{"name":"_initialize","offset":0,"parameters":[],"returntype":"Void","safe":false},{"name":"_deploy","offset":32,"parameters":[{"name":"data","type":"Any"},{"name":"isUpdate","type":"Boolean"}],"returntype":"Void","safe":false},{"name":"addRecord","offset":3236,"parameters":[{"name":"name","type":"String"},{"name":"typ","type":"Integer"},{"name":"data","type":"String"}],"returntype":"Void","safe":false},{"name":"balanceOf","offset":976,"parameters":[{"name":"owner","type":"Hash160"}],"returntype":"Integer","safe":true},{"name":"decimals","offset":791,"parameters":[],"returntype":"Integer","safe":true},{"name":"deleteRecords","offset":3460,"parameters":[{"name":"name","type":"String"},{"name":"typ","type":"Integer"}],"returntype":"Void","safe":false},{"name":"getAllRecords","offset":3704,"parameters":[{"name":"name","type":"String"}],"returntype":"InteropInterface","safe":true},{"name":"getPrice","offset":1427,"parameters":[],"returntype":"Integer","safe":true},{"name":"getRecords","offset":3376,"parameters":[{"name":"name","type":"String"},{"name":"typ","type":"Integer"}],"returntype":"Array","safe":true},{"name":"isAvailable","offset":1461,"parameters":[{"name":"name","type":"String"}],"returntype":"Boolean","safe":true},{"name":"ownerOf","offset":813,"parameters":[{"name":"tokenID","type":"ByteArray"}],"returntype":"Hash160","safe":true},{"name":"properties","offset":883,"parameters":[{"name":"tokenID","type":"ByteArray"}],"returntype":"Map","safe":true},{"name":"register","offset":1722,"parameters":[{"name":"name","type":"String"},{"name":"owner","type":"Hash160"},{"name":"email","type":"String"},{"name":"refresh","type":"Integer"},{"name":"retry","type":"Integer"},{"name":"expire","type":"Integer"},{"name":"ttl","type":"Integer"}],"returntype":"Boolean","safe":false},{"name":"registerTLD","offset":2397,"parameters":[{"name":"name","type":"String"},{"name":"email","type":"String"},{"name":"refresh","type":"Integer"},{"name":"retry","type":"Integer"},{"name":"expire","type":"Integer"},{"name":"ttl","type":"Integer"}],"returntype":"Void","safe":false},{"name":"renew","offset":2610,"parameters":[{"name":"name","type":"String"}],"returntype":"Integer","safe":false},{"name":"resolve","offset":3642,"parameters":[{"name":"name","type":"String"},{"name":"typ","type":"Integer"}],"returntype":"Array","safe":true},{"name":"roots","offset":1321,"parameters":[],"returntype":"InteropInterface","safe":true},{"name":"setAdmin","offset":2821,"parameters":[{"name":"name","type":"String"},{"name":"admin","type":"Hash160"}],"returntype":"Void","safe":false},{"name":"setPrice","offset":1349,"parameters":[{"name":"price","type":"Integer"}],"returntype":"Void","safe":false},{"name":"setRecord","offset":2996,"parameters":[{"name":"name","type":"String"},{"name":"typ","type":"Integer"},{"name":"id","type":"Integer"},{"name":"data","type":"String"}],"returntype":"Void","safe":false},{"name":"symbol","offset":785,"parameters":[],"returntype":"String","safe":true},{"name":"tokens","offset":1052,"parameters":[],"returntype":"InteropInterface","safe":true},{"name":"tokensOf","offset":1081,"parameters":[{"name":"owner","type":"Hash160"}],"returntype":"InteropInterface","safe":true},{"name":"totalSupply","offset":797,"parameters":[],"returntype":"Integer","safe":true},{"name":"transfer","offset":1143,"parameters":[{"name":"to","type":"Hash160"},{"name":"tokenID","type":"ByteArray"},{"name":"data","type":"Any"}],"returntype":"Boolean","safe":false},{"name":"update","offset":698,"parameters":[{"name":"nef","type":"ByteArray"},{"name":"manifest","type":"String"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"updateSOA","offset":2731,"parameters":[{"name":"name","type":"String"},{"name":"email","type":"String"},{"name":"refresh","type":"Integer"},{"name":"retry","type":"Integer"},{"name":"expire","type":"Integer"},{"name":"ttl","type":"Integer"}],"returntype":"Void","safe":false},{"name":"version","offset":793,"parameters":[],"returntype":"Integer","safe":true}],"events":[{"name":"Transfer","parameters":[{"name":"from","type":"Hash160"},{"name":"to","type":"Hash160"},{"name":"amount","type":"Integer"},{"name":"tokenId","type":"ByteArray"}]}]},"features":{},"groups":[],"permissions":[{"contract":"0xfffdc93764dbaddd97c48f252a53ea4643faa3fd","methods":["update"]},{"contract":"*","methods":["onNEP11Payment"]}],"supportedstandards":["NEP-11"],"trusts":[],"extra":null} \ No newline at end of file diff --git a/contracts/00-nns.nef b/contracts/00-nns.nef deleted file mode 100755 index 793e7ad7305f6f7fcc7f5535b29d41708df85377..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7084 zcmbtYeQX=&d4G?jL{dCkN9x0hW7jmT&>E8{w4#e@4w)$=N>MuY=t{2KWM8a!_TBM# zM;?#j9c8Cz&(RFFCBFna9 zTQ-OLy~jI}lI(nJ`a^fT_v86~p5OBvpS$l)RnTrfqurjIJd~WCOp^b@AA9As!_Aj} z^0QmM^V}1%^$+*%*wC6^XNy8n)2(?Sr!R>f!jS823RVPN$|+J^U~aI(CmCAqM#n=H zLzmPu^Cd+xZn!5eyepASy!yb&wXeK&&wa1XCvN%e7ta6vH-36wFM^g;4*xg!974&FL zGE|{bi7tu4QXzUeCn-YyH`0p(9_!#=VXv8aDLwA{LAoT0nT_$j7h}FTF1*&vytE%* z_m?F;iyI{-dtcIGlYa6pYX+axpxcRxn}tB1wOcw zkP!WKVjcfy7*drLu34O){ppdhPaXJNtJP|AR`Y9qmLblqTzj2<;+#(&^5SE^*#2y8 zj4wlUo3UCz3vkWMi`>zpQ@@s}1vNkYtp!2ec?mZeZYOif<00PfM)11pBtH@$gx#YH zXQYZD=t4faq&e1$=Cxu@Qlp(q8najb=|f+*5c}P^xw-TrVNB*iYI2&5mvmuS(yEo{ zvY=NaO^p_%N-<|FiK(bymV_k(xBk-I*t|PC;~|Zd$sEok53{!}IUX66D$$&x3%R@% z)lNqZQHUxzL#P<;g{de`IEQV*8}R_Xgs-Gst7kUizPaZz_;}Uca4I|P#f!(B{m+B{ z{OHBF&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VLAm%Fu$&kC2=E1{ZnzD~3S<_gM*_1G~5hDz*{6gvOdzGWA-B;ZCVzU zu5rSvtGaT*IPeHGVj@!e&T^BR28el#nwN}JFSZG@tee;ATr5@ZF2e3)GBI4|dOu+@ z^RS5yBM;e1EGdg^$Z&_)3mJ3-2p|Lc8XGd8KfU@%d>Tpgb9o5fe(ZnYd$P>jKU1gL9Hw6gpUG5tW1>%dyVpz^p0-5uSg KA6$F(SN<2@4=M8i diff --git a/contracts/01-proxy.manifest.json b/contracts/01-proxy.manifest.json deleted file mode 100755 index cb27a21ea1..0000000000 --- a/contracts/01-proxy.manifest.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"NeoFS Notary Proxy","abi":{"methods":[{"name":"_deploy","offset":0,"parameters":[{"name":"data","type":"Any"},{"name":"isUpdate","type":"Boolean"}],"returntype":"Void","safe":false},{"name":"onNEP17Payment","offset":314,"parameters":[{"name":"from","type":"Hash160"},{"name":"amount","type":"Integer"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"update","offset":472,"parameters":[{"name":"script","type":"ByteArray"},{"name":"manifest","type":"ByteArray"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"verify","offset":601,"parameters":[],"returntype":"Boolean","safe":true},{"name":"version","offset":644,"parameters":[],"returntype":"Integer","safe":true}],"events":[]},"features":{},"groups":[],"permissions":[{"contract":"*","methods":["update"]}],"supportedstandards":[],"trusts":[],"extra":null} \ No newline at end of file diff --git a/contracts/01-proxy.nef b/contracts/01-proxy.nef deleted file mode 100755 index 76be041d1ab25ea71db906ee55a9dd0b69d43626..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 794 zcmeZsbu-RO&DTxO*EP^HG%(RKU?2l9eNBGlut&qzmyh*G-(uFypB5B5yyrx$01;`kaZ3P*QKh)p!fW;Z-Sm~MYs1+2YmSyIb7Ausc78Pga=PBf7 z7Uw3GBxhJDq*fH9CYPk9DA?Ho6-xz}Gct5rRWMq58CddYBOF|;keE}HnwV0lke{Yd zl98&AlUR~kTmm!DN&%}VOBXH$?- zn0Z4@nn&b(*`w|YY&u@t6h7vQUidW_h6=xjsDq5LdH#LBvtbttt zRB}4d93^IsRcabM@@UbJn4FwiP*SYm?ij3)pO;f37%OPBB0E z_dgFCM2~z%h+|T1bdW2L7@A8U^036f1W62>0jA&n{{LT?369TIYC^!|Vfq9i;=thm M3{Ho8YzGbj0Bao;5C8xG diff --git a/contracts/02-audit.manifest.json b/contracts/02-audit.manifest.json deleted file mode 100755 index 6a71f553d2..0000000000 --- a/contracts/02-audit.manifest.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"NeoFS Audit","abi":{"methods":[{"name":"_deploy","offset":0,"parameters":[{"name":"data","type":"Any"},{"name":"isUpdate","type":"Boolean"}],"returntype":"Void","safe":false},{"name":"get","offset":832,"parameters":[{"name":"id","type":"ByteArray"}],"returntype":"ByteArray","safe":true},{"name":"list","offset":857,"parameters":[],"returntype":"Array","safe":true},{"name":"listByCID","offset":923,"parameters":[{"name":"epoch","type":"Integer"},{"name":"cid","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"listByEpoch","offset":891,"parameters":[{"name":"epoch","type":"Integer"}],"returntype":"Array","safe":true},{"name":"listByNode","offset":966,"parameters":[{"name":"epoch","type":"Integer"},{"name":"cid","type":"ByteArray"},{"name":"key","type":"PublicKey"}],"returntype":"Array","safe":true},{"name":"put","offset":685,"parameters":[{"name":"rawAuditResult","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"update","offset":556,"parameters":[{"name":"script","type":"ByteArray"},{"name":"manifest","type":"ByteArray"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"version","offset":1044,"parameters":[],"returntype":"Integer","safe":true}],"events":[]},"features":{},"groups":[],"permissions":[{"contract":"*","methods":["update"]}],"supportedstandards":[],"trusts":[],"extra":null} \ No newline at end of file diff --git a/contracts/02-audit.nef b/contracts/02-audit.nef deleted file mode 100755 index 2f2c15f90938147a871dbdf6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xdetDqx%KD;bgA(%mXvBVOZFe#K#YRaWhHYN!=TK>y@7;Y}6Xvj7sZSvWsj!4x(KN zsnxKb!{IbR%nxU?!qN3YN2SlSusWIbCYJLq9m@aqfw8zg^v)2hu3ZJhjb-~JoZyLTMF@XmK1T~_m7Z?u`d zPR$59B+k5cs8ZB#))Gl-qLf(n?8KP*TfPb12 z?|fYO!5*jq$Cq+hk~=glexLpHJx3QC$(s#sD>=pxEnWQe(C5RE=vpmvRU?~^F%&@| zgrb!4FGbe%MWLLClz~DJ4HKl?H#MZCBl!V0GT8nPVH~s{kZhz6Ts*LJY|YKAR|JA} P*t^{&@UGD*etFm5!4lXK diff --git a/contracts/06-neofsid.manifest.json b/contracts/06-neofsid.manifest.json deleted file mode 100755 index 02d2d78f3d..0000000000 --- a/contracts/06-neofsid.manifest.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"NeoFS ID","abi":{"methods":[{"name":"_initialize","offset":0,"parameters":[],"returntype":"Void","safe":false},{"name":"_deploy","offset":35,"parameters":[{"name":"data","type":"Any"},{"name":"isUpdate","type":"Boolean"}],"returntype":"Void","safe":false},{"name":"addKey","offset":857,"parameters":[{"name":"owner","type":"ByteArray"},{"name":"keys","type":"Array"}],"returntype":"Void","safe":false},{"name":"key","offset":1269,"parameters":[{"name":"owner","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"removeKey","offset":1062,"parameters":[{"name":"owner","type":"ByteArray"},{"name":"keys","type":"Array"}],"returntype":"Void","safe":false},{"name":"update","offset":726,"parameters":[{"name":"script","type":"ByteArray"},{"name":"manifest","type":"ByteArray"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"version","offset":1340,"parameters":[],"returntype":"Integer","safe":true}],"events":[]},"features":{},"groups":[],"permissions":[{"contract":"*","methods":["update"]}],"supportedstandards":[],"trusts":[],"extra":null} \ No newline at end of file diff --git a/contracts/06-neofsid.nef b/contracts/06-neofsid.nef deleted file mode 100755 index 39f00c276b801149ac30f431947cedc7500ed165..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1618 zcmcIkU2NM_6t>&6wAuyIpH16X*=^Q&VX%<0gwjX_o00(@pomO#5<ZiSKFD_kF|Yrea;oHfk{M1 zNuhu#MTp~gzH)82x_t5S?ypYI8UFWA+_^}qA4M=FN(;wxUtEt2iVyFdIhA|o>r2mc z|IU4i&H=ULILM+;TN?8I31O3lT;yQI#77X%fH-btrtJkD^eLvTE8~d58B8tYx=_`T zIt3>bY$EMtajdmPdhf<$)%JzFCohQuk@I2^V|j6)?QATPjdmTa%1iw$+V2?Y4;ie% z>yIZo^mK*QF!)F0#63EQT8I`DJFhy}rcWuZo|7It{N+^<>|jHkaIpqeVo^s?Da010 zjV?85;m0T6632LMh~sR%Gna}se>!rhR`%24HT&qE>-nJTeb!~yx>!A;dpXJ2f4Q^% zHg(F@r9bxk@|rlt@g85!BvL@I9W;$e$%WI%aWS!A0lNi-s(J<@&qgXm8hmtwC2!9S z@!V|2$sFt~rMWfv-@gA~n&WCBthK~tf~rK^A$$X9=Ky%F-=0<#!NdH zPkw#y&6j=}wDrY-&APmlWP3^uwQ}Je#b_ny=WsAhuEh&xGcQE^OarCeB2;nwoD_lx z_kq5RXa{LbSmDZIaeaPX*yW|uwOVan*bX+^$kMPi38x7~P(w7BYQ_W20(Cifpr;P5 zU<*07N~I1M2Roa^-IA&@u}+js(}%Z|ALCooy*KNX_kb9&Sc1ChFQ_UOEZG{{Pg8Ok z&p(njSbn~zVuRk5V}FhwxRT$y`;9YifA{fuZRneo8fb64*{L6r#$S2y`7GFan{XQ$ ztDcXQKxXK9rDcU#~W|%=O2&f!?)TyEJZM6;2^P zQ;vO`&1M5L7SlifRjV<>jk2}@Pr}VI8MS2r=gqnyxFFN1FzB1r*%B@Qo)44r(xu0? zzFLl*W1wIQD*(qy$C&%}@O*V;6AONwHd7zWFz4Bsir2 diff --git a/contracts/07-container.manifest.json b/contracts/07-container.manifest.json deleted file mode 100755 index 387a77b723..0000000000 --- a/contracts/07-container.manifest.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"NeoFS Container","abi":{"methods":[{"name":"_initialize","offset":0,"parameters":[],"returntype":"Void","safe":false},{"name":"_deploy","offset":83,"parameters":[{"name":"data","type":"Any"},{"name":"isUpdate","type":"Boolean"}],"returntype":"Void","safe":false},{"name":"alias","offset":3554,"parameters":[{"name":"cid","type":"ByteArray"}],"returntype":"String","safe":true},{"name":"containersOf","offset":3694,"parameters":[{"name":"owner","type":"ByteArray"}],"returntype":"InteropInterface","safe":true},{"name":"count","offset":3649,"parameters":[],"returntype":"Integer","safe":true},{"name":"delete","offset":3145,"parameters":[{"name":"containerID","type":"ByteArray"},{"name":"signature","type":"Signature"},{"name":"token","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"eACL","offset":4106,"parameters":[{"name":"containerID","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"get","offset":3441,"parameters":[{"name":"containerID","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"getContainerSize","offset":4366,"parameters":[{"name":"id","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"iterateAllContainerSizes","offset":4739,"parameters":[{"name":"epoch","type":"Integer"}],"returntype":"InteropInterface","safe":true},{"name":"iterateContainerSizes","offset":4641,"parameters":[{"name":"epoch","type":"Integer"},{"name":"cid","type":"Hash256"}],"returntype":"InteropInterface","safe":true},{"name":"list","offset":3748,"parameters":[{"name":"owner","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"listContainerSizes","offset":4480,"parameters":[{"name":"epoch","type":"Integer"}],"returntype":"Array","safe":true},{"name":"newEpoch","offset":4791,"parameters":[{"name":"epochNum","type":"Integer"}],"returntype":"Void","safe":false},{"name":"onNEP11Payment","offset":1670,"parameters":[{"name":"a","type":"Hash160"},{"name":"b","type":"Integer"},{"name":"c","type":"ByteArray"},{"name":"d","type":"Any"}],"returntype":"Void","safe":false},{"name":"owner","offset":3503,"parameters":[{"name":"containerID","type":"ByteArray"}],"returntype":"ByteArray","safe":true},{"name":"put","offset":2061,"parameters":[{"name":"container","type":"ByteArray"},{"name":"signature","type":"Signature"},{"name":"publicKey","type":"PublicKey"},{"name":"token","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"putContainerSize","offset":4164,"parameters":[{"name":"epoch","type":"Integer"},{"name":"cid","type":"ByteArray"},{"name":"usedSize","type":"Integer"},{"name":"pubKey","type":"PublicKey"}],"returntype":"Void","safe":false},{"name":"putNamed","offset":2077,"parameters":[{"name":"container","type":"ByteArray"},{"name":"signature","type":"Signature"},{"name":"publicKey","type":"PublicKey"},{"name":"token","type":"ByteArray"},{"name":"name","type":"String"},{"name":"zone","type":"String"}],"returntype":"Void","safe":false},{"name":"setEACL","offset":3844,"parameters":[{"name":"eACL","type":"ByteArray"},{"name":"signature","type":"Signature"},{"name":"publicKey","type":"PublicKey"},{"name":"token","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"startContainerEstimation","offset":4821,"parameters":[{"name":"epoch","type":"Integer"}],"returntype":"Void","safe":false},{"name":"stopContainerEstimation","offset":4902,"parameters":[{"name":"epoch","type":"Integer"}],"returntype":"Void","safe":false},{"name":"update","offset":1928,"parameters":[{"name":"script","type":"ByteArray"},{"name":"manifest","type":"ByteArray"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"version","offset":4982,"parameters":[],"returntype":"Integer","safe":true}],"events":[{"name":"PutSuccess","parameters":[{"name":"containerID","type":"Hash256"},{"name":"publicKey","type":"PublicKey"}]},{"name":"DeleteSuccess","parameters":[{"name":"containerID","type":"ByteArray"}]},{"name":"SetEACLSuccess","parameters":[{"name":"containerID","type":"ByteArray"},{"name":"publicKey","type":"PublicKey"}]},{"name":"StartEstimation","parameters":[{"name":"epoch","type":"Integer"}]},{"name":"StopEstimation","parameters":[{"name":"epoch","type":"Integer"}]}]},"features":{},"groups":[],"permissions":[{"contract":"*","methods":["update","addKey","transferX","register","registerTLD","addRecord","deleteRecords","subscribeForNewEpoch"]}],"supportedstandards":[],"trusts":[],"extra":null} \ No newline at end of file diff --git a/contracts/07-container.nef b/contracts/07-container.nef deleted file mode 100755 index 384241bba5f7c91e4a962499821e0428f2d416ce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6459 zcmbVQe{37|6+b&pY$xBeXU9%U+BAn7+z@C;+Zu^&cbLSlt2YRZtNDPz(m2229c48bN4OZa1dq?Cznn%F>NY@n8nt$6Q# zC)A`H{>S$Fe&74P_rC9a-h1C8BL{W~EZ#naw+{~N7#tcHBtFHb?PBKb7Q{5%8I)OxXA1oEC+_g^3TE_!o_o)?BYAVb`m6LKzj^a;_ygi8_BE6#OA;$6 z2Zb!F=_WPOrY*~^I%U(v@=rqF;_mHWTIomo?)&Y9rwUSw%rQIZn?FfSWEwOg*tRs1 z5tMk5EoOJzJgAEyh|BzjFZz&&96dMK>pMUAWz@|SM2?wY6-wn5ft6({qkD*&WcUJ` zWl*FMc>?*^)V{-(kW6yC)tmakrKv?x8$Fi+pBOI&yOzmHoqM6jgXbesV1J#^5i%FXvOUfp=!NeH$3_srQea?H)as0)~`QAQv4u1l4~7 z2ZVI$rV}r|!yykGX_zv)9B&>$1T57Gp~bP(o40PfcNOFAk1^sk7`K+|^?J_3?Hvek z^qtKFk!&lsRoYa4n;Jlb8g%W74sPQkV49_aWi1iuCtb1{hz05WUV=~qE@OBw&W9Q? zu6N1hSO*TE7J*fYjF_gkgNU*#p#vm@8%uD=l~@EM_$QbGBV^b#{Wb(a#T5|&?K>KY zAYHQRk41GEfB=&+pH0(00vW2`719ZML_tU&TvnfRQRGh2rK-W$dKAoHL1B1-mDC`I zNYkpZ3`D5%1xDtI=ACf}GS$%5T@vi2FrS6Y;+3kqhW++pyCBFb=mDGV2l^ctD>!IU zZ~zC>^j3&L8uF7sTO7S8{g;k16ff|Ki2>Qv(w{&7z2q>&z_^EiFOdtThe+p7AU)Is zf4rJwdH77nqoLDcH6B_)(IwIl>*TWx6O`N>zjuHLH(69#-SdK@~dI3{Mj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=%)kNk;6|b83@2-t<16*F z$-tMoQCFB`;70AT?bCYP4?Ce13urbtYc&O%t5!{xhYqSxsMEA232su($F~VmRTlwr z3siKMFOZVvwAh>Q(m+x&G4yPD_Y=SQyB|XJY~DQgg}?5BO6u-{0mP%FN!u}zx7y4pgSY3cOU+k^X@(|bEy|z zxwpAM?eHnk6KnA=_dEyvP0%FUU^A|C3`(}arsv&#l54P;z()+m_o6r=u?|Ovr!$k zAher0AMJbrC|z7$?)e$~R)9*K2ilC#!N)e>3Jkm-?XAP1hS03Vw++^ye05+lhG+m- z8$!uguujac{Kqu4GCK!>EXVIbT`E?1OW0~L437=F+>;gHea9C)?-n3E_{hcreCbCI ze8iVgyE!yC<9e{Oe0wW!QdYM_uN3q32Gdn&pkO1p(KfF{5kT!_~I?f~l)N-6f15TG@48qiVHzRQJq=j8e2kbZI z6ts}QLMb4-nb=^e`BFOxkoKig2k8J)h#)WZJ+?F$uzz6PLC`{}6Ts}HUJFw59pRPI zR=N}^4MwzP|#2gD$zyg z3{Xi;Ed=LE!JYd|)1*rw657bm`JPuGBAJAsMTV)JK*gmn2|Lk6Ai9VfT>=f>S#-KV zG;Ydr%?d4YhoLp7|6idsst?VTLOTZ_uJUaoisZ~Ln^13&E?_wRpn#Z-($|Z?A-Xr+g`sF#K&?yg_^}cDA+T^>g)O5j_lB+c+?fUKdP`QsiW}&Uszv+3XOu!V zfhemv#CJ<5mSh?rX!SSVW-?n5d|ztLM?q|dgtjG}{^zFLDV2?{hFW#9J>XFarnJ=P I7q9I9FFtOQ?f?J) diff --git a/contracts/contracts.go b/contracts/contracts.go deleted file mode 100644 index 85548e2773..0000000000 --- a/contracts/contracts.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -Package contracts embeds compiled Neo contracts and provides access to them. -*/ -package contracts - -import ( - "embed" - "encoding/json" - "errors" - "fmt" - "io/fs" - "sort" - "strconv" - "strings" - - "github.com/nspcc-dev/neo-go/pkg/io" - "github.com/nspcc-dev/neo-go/pkg/smartcontract/manifest" - "github.com/nspcc-dev/neo-go/pkg/smartcontract/nef" -) - -// Contract groups information about Neo contract stored in the current package. -type Contract struct { - NEF nef.File - Manifest manifest.Manifest -} - -//go:embed *.nef *.manifest.json -var _fs embed.FS - -// Read reads compiled contracts stored in the package sorted numerically. -// File schema: -// - compiled executables (NEF) are named by pattern 'N-C.nef' -// - JSON-encoded manifests are named by pattern 'N-C.manifest.json' -// -// where C is the contract name (a-z) and N is the serial number of the contract -// starting from 0. Leading zeros are ignored (except zero sequence -// corresponding to N=0). -// -// If NEF file exists, corresponding manifest file must exist. If manifest -// file is presented without corresponding NEF file, the contract is ignored. -// -// Read fails if contract files has invalid name or format. -func Read() ([]Contract, error) { - return read(_fs) -} - -const nefFileSuffix = ".nef" - -var ( - errInvalidFilename = errors.New("invalid file name") - errDuplicatedContract = errors.New("duplicated contract") - errInvalidNEF = errors.New("invalid NEF") - errInvalidManifest = errors.New("invalid manifest") -) - -type numberedContract struct { - i int - c Contract -} - -type numberedContracts []numberedContract - -func (x numberedContracts) Len() int { return len(x) } -func (x numberedContracts) Less(i, j int) bool { return x[i].i < x[j].i } -func (x numberedContracts) Swap(i, j int) { x[i], x[j] = x[j], x[i] } - -// read same as Read by allows to override source fs.FS. -func read(_fs fs.FS) ([]Contract, error) { - nefFiles, err := fs.Glob(_fs, "*"+nefFileSuffix) - if err != nil { - return nil, fmt.Errorf("match files with suffix %s", nefFileSuffix) - } - - cs := make(numberedContracts, 0, len(nefFiles)) - - for i := range nefFiles { - prefix := strings.TrimSuffix(nefFiles[i], nefFileSuffix) - if prefix == "" { - return nil, fmt.Errorf("%w: missing prefix '%s'", errInvalidFilename, nefFiles[i]) - } - - hyphenInd := strings.IndexByte(prefix, '-') - if hyphenInd < 0 { - return nil, fmt.Errorf("%w: missing hyphen '%s'", errInvalidFilename, nefFiles[i]) - } - - name := prefix[hyphenInd+1:] - if len(name) == 0 { - return nil, fmt.Errorf("%w: missing name '%s'", errInvalidFilename, nefFiles[i]) - } - - for i := range name { - if name[i] < 'a' || name[i] > 'z' { - return nil, fmt.Errorf("%w: unsupported char in name %c", errInvalidFilename, name[i]) - } - } - - var ind int - - if noZerosPrefix := strings.TrimLeft(prefix[:hyphenInd], "0"); len(noZerosPrefix) > 0 { - ind, err = strconv.Atoi(noZerosPrefix) - if err != nil { - return nil, fmt.Errorf("%w: invalid prefix of file name '%s' (expected serial number)", errInvalidFilename, nefFiles[i]) - } else if ind < 0 { - return nil, fmt.Errorf("%w: negative serial number in file name '%s'", errInvalidFilename, nefFiles[i]) - } - } - - for i := range cs { - if cs[i].i == ind { - return nil, fmt.Errorf("%w: more than one file with serial number #%d", errDuplicatedContract, ind) - } - } - - c, err := readContractFromFiles(_fs, prefix) - if err != nil { - return nil, fmt.Errorf("read contract #%d: %w", ind, err) - } - - cs = append(cs, numberedContract{ - i: ind, - c: c, - }) - } - - sort.Sort(cs) - - res := make([]Contract, len(cs)) - - for i := range cs { - res[i] = cs[i].c - } - - return res, nil -} - -func readContractFromFiles(_fs fs.FS, filePrefix string) (c Contract, err error) { - fNEF, err := _fs.Open(filePrefix + nefFileSuffix) - if err != nil { - return c, fmt.Errorf("open file containing contract NEF: %w", err) - } - defer fNEF.Close() - - fManifest, err := _fs.Open(filePrefix + ".manifest.json") - if err != nil { - return c, fmt.Errorf("open file containing contract NEF: %w", err) - } - defer fManifest.Close() - - bReader := io.NewBinReaderFromIO(fNEF) - c.NEF.DecodeBinary(bReader) - if bReader.Err != nil { - return c, fmt.Errorf("%w: %w", errInvalidNEF, bReader.Err) - } - - err = json.NewDecoder(fManifest).Decode(&c.Manifest) - if err != nil { - return c, fmt.Errorf("%w: %w", errInvalidManifest, err) - } - - return -} diff --git a/contracts/contracts_test.go b/contracts/contracts_test.go deleted file mode 100644 index afadb0e71f..0000000000 --- a/contracts/contracts_test.go +++ /dev/null @@ -1,130 +0,0 @@ -package contracts - -import ( - "crypto/rand" - "encoding/json" - "testing" - "testing/fstest" - - "github.com/nspcc-dev/neo-go/pkg/smartcontract/manifest" - "github.com/nspcc-dev/neo-go/pkg/smartcontract/nef" - "github.com/stretchr/testify/require" -) - -func TestReadRepo(t *testing.T) { - _, err := Read() - require.NoError(t, err) -} - -func TestReadOrder(t *testing.T) { - _nef0, bNEF0 := anyValidNEF(t) - _manifest0, jManifest0 := anyValidManifest(t, "first") - _nef1, bNEF1 := anyValidNEF(t) - _manifest1, jManifest1 := anyValidManifest(t, "second") - _nef11, bNEF11 := anyValidNEF(t) - _manifest11, jManifest11 := anyValidManifest(t, "twelfth") - - _fs := fstest.MapFS{ - "00-hello.nef": {Data: bNEF0}, - "00-hello.manifest.json": {Data: jManifest0}, - "01-world.nef": {Data: bNEF1}, - "01-world.manifest.json": {Data: jManifest1}, - "11-bye.nef": {Data: bNEF11}, - "11-bye.manifest.json": {Data: jManifest11}, - } - - cs, err := read(_fs) - require.NoError(t, err) - require.Len(t, cs, 3) - - require.Equal(t, _nef0, cs[0].NEF) - require.Equal(t, _manifest0, cs[0].Manifest) - require.Equal(t, _nef1, cs[1].NEF) - require.Equal(t, _manifest1, cs[1].Manifest) - require.Equal(t, _nef11, cs[2].NEF) - require.Equal(t, _manifest11, cs[2].Manifest) -} - -func TestReadInvalidFilenames(t *testing.T) { - _fs := fstest.MapFS{} - - _, err := read(_fs) - require.NoError(t, err) - - for _, invalidName := range []string{ - "hello.nef", - "-.nef", - "-0.nef", - "0-.nef", - "0-_.nef", - "0-1.nef", - ".nef", - } { - _fs[invalidName] = &fstest.MapFile{} - _, err = read(_fs) - require.ErrorIs(t, err, errInvalidFilename, invalidName) - delete(_fs, invalidName) - } -} - -func TestReadDuplicatedContract(t *testing.T) { - _, bNEF := anyValidNEF(t) - _, jManifest := anyValidManifest(t, "some name") - - _fs := fstest.MapFS{ - "01-hello.nef": {Data: bNEF}, - "01-hello.manifest.json": {Data: jManifest}, - "001-hello.nef": {Data: bNEF}, - "001-hello.manifest.json": {Data: jManifest}, - } - - _, err := read(_fs) - require.ErrorIs(t, err, errDuplicatedContract) -} - -func TestReadInvalidFormat(t *testing.T) { - _fs := fstest.MapFS{} - - _, validNEF := anyValidNEF(t) - _, validManifest := anyValidManifest(t, "zero") - - _fs["00-hello.nef"] = &fstest.MapFile{Data: validNEF} - _fs["00-hello.manifest.json"] = &fstest.MapFile{Data: validManifest} - - _, err := read(_fs) - require.NoError(t, err, errInvalidNEF) - - _fs["00-hello.nef"] = &fstest.MapFile{Data: []byte("not a NEF")} - _fs["00-hello.manifest.json"] = &fstest.MapFile{Data: validManifest} - - _, err = read(_fs) - require.ErrorIs(t, err, errInvalidNEF) - - _fs["00-hello.nef"] = &fstest.MapFile{Data: validNEF} - _fs["00-hello.manifest.json"] = &fstest.MapFile{Data: []byte("not a manifest")} - - _, err = read(_fs) - require.ErrorIs(t, err, errInvalidManifest) -} - -func anyValidNEF(tb testing.TB) (nef.File, []byte) { - script := make([]byte, 32) - rand.Read(script) - - _nef, err := nef.NewFile(script) - require.NoError(tb, err) - - bNEF, err := _nef.Bytes() - require.NoError(tb, err) - - return *_nef, bNEF -} - -func anyValidManifest(tb testing.TB, name string) (manifest.Manifest, []byte) { - _manifest := manifest.NewManifest(name) - - jManifest, err := json.Marshal(_manifest) - require.NoError(tb, err) - - return *_manifest, jManifest -} diff --git a/go.mod b/go.mod index b1df1f40c6..55f0e6049b 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/nspcc-dev/locode-db v0.6.0 github.com/nspcc-dev/neo-go v0.106.2 github.com/nspcc-dev/neofs-api-go/v2 v2.14.1-0.20240305074711-35bc78d84dc4 - github.com/nspcc-dev/neofs-contract v0.19.2-0.20240506202632-e78d64ecdfc2 + github.com/nspcc-dev/neofs-contract v0.19.2-0.20240614095443-f16f0f4b0418 github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.12 github.com/nspcc-dev/tzhash v1.8.0 github.com/olekukonko/tablewriter v0.0.5 @@ -72,7 +72,7 @@ require ( github.com/multiformats/go-varint v0.0.7 // indirect github.com/nspcc-dev/dbft v0.2.0 // indirect github.com/nspcc-dev/go-ordered-json v0.0.0-20240301084351-0246b013f8b2 // indirect - github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240521091047-78685785716d // indirect + github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240521124852-5cbfe215a4e9 // indirect github.com/nspcc-dev/rfc6979 v0.2.1 // indirect github.com/pelletier/go-toml/v2 v2.1.1 // indirect github.com/pierrec/lz4 v2.6.1+incompatible // indirect diff --git a/go.sum b/go.sum index 68088f680e..24b9fc6bf8 100644 --- a/go.sum +++ b/go.sum @@ -130,12 +130,12 @@ github.com/nspcc-dev/locode-db v0.6.0 h1:EdRUug+sL0EMLZgucLETD6bnegKjyEZh+D5x4r5 github.com/nspcc-dev/locode-db v0.6.0/go.mod h1:mJLXdzlcRucr3AFUvf5fJH+rFv1bJuU85e1jtDHDTz8= github.com/nspcc-dev/neo-go v0.106.2 h1:KXSJ2J5Oacc7LrX3r4jvnC8ihKqHs5NB21q4f2S3r9o= github.com/nspcc-dev/neo-go v0.106.2/go.mod h1:Ojwfx3/lv0VTeEHMpQ17g0wTnXcCSoFQVq5GEeCZmGo= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240521091047-78685785716d h1:Vcb7YkZuUSSIC+WF/xV3UDfHbAxZgyT2zGleJP3Ig5k= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240521091047-78685785716d/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240521124852-5cbfe215a4e9 h1:hyMWJslDNfcKoCY3Skr4ehl7FvclxRhTW3yaA+0VkbY= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240521124852-5cbfe215a4e9/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= github.com/nspcc-dev/neofs-api-go/v2 v2.14.1-0.20240305074711-35bc78d84dc4 h1:arN0Ypn+jawZpu1BND7TGRn44InAVIqKygndsx0y2no= github.com/nspcc-dev/neofs-api-go/v2 v2.14.1-0.20240305074711-35bc78d84dc4/go.mod h1:7Tm1NKEoUVVIUlkVwFrPh7GG5+Lmta2m7EGr4oVpBd8= -github.com/nspcc-dev/neofs-contract v0.19.2-0.20240506202632-e78d64ecdfc2 h1:VT9/vs92xth7c2PIxiGt1NIK77VK2kjSFqLMWmMY/pc= -github.com/nspcc-dev/neofs-contract v0.19.2-0.20240506202632-e78d64ecdfc2/go.mod h1:5nBFjgF2/SNpEty5oZzfTLck3YCSHLgnL4Tlv2xo54c= +github.com/nspcc-dev/neofs-contract v0.19.2-0.20240614095443-f16f0f4b0418 h1:NJU8SJtkgBCZXSVjNqlhLLO9yrqnd+S6KFhkeB5qZIw= +github.com/nspcc-dev/neofs-contract v0.19.2-0.20240614095443-f16f0f4b0418/go.mod h1:w9twCSz3qQv9E1bafpdGr6GtF+3ln3kkyfP9P7QVJ/M= github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.12 h1:mdxtlSU2I4oVZ/7AXTLKyz8uUPbDWikZw4DM8gvrddA= github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.12/go.mod h1:JdsEM1qgNukrWqgOBDChcYp8oY4XUzidcKaxY4hNJvQ= github.com/nspcc-dev/rfc6979 v0.2.1 h1:8wWxkamHWFmO790GsewSoKUSJjVnL1fmdRpokU/RgRM= diff --git a/pkg/innerring/contracts.go b/pkg/innerring/contracts.go index 4568a956ee..f8af6a3f99 100644 --- a/pkg/innerring/contracts.go +++ b/pkg/innerring/contracts.go @@ -9,8 +9,8 @@ import ( "github.com/nspcc-dev/neo-go/pkg/neorpc" "github.com/nspcc-dev/neo-go/pkg/util" + embeddedcontracts "github.com/nspcc-dev/neofs-contract/contracts" "github.com/nspcc-dev/neofs-contract/deploy" - embeddedcontracts "github.com/nspcc-dev/neofs-node/contracts" "github.com/nspcc-dev/neofs-node/pkg/morph/client" "github.com/nspcc-dev/neofs-node/pkg/util/glagolitsa" "github.com/spf13/cast" @@ -207,7 +207,7 @@ func parseContract(ctx *nnsContext, _logger *zap.Logger, cfg *viper.Viper, morph } func readEmbeddedContracts(deployPrm *deploy.Prm) error { - cs, err := embeddedcontracts.Read() + cs, err := embeddedcontracts.GetFS() if err != nil { return fmt.Errorf("read embedded contracts: %w", err) }