@@ -15,11 +15,17 @@ use crate::precompiles::{
15
15
} ;
16
16
use crate :: { Runtime , RuntimeCall } ;
17
17
18
- // max paramter lenght 4K
19
- pub const MAX_PARAMETER_SIZE : usize = 4 * 1024 ;
20
-
21
18
pub struct NeuronPrecompile ;
22
19
20
+ impl PrecompileExt for NeuronPrecompile {
21
+ const INDEX : u64 = 2052 ;
22
+ const ADDRESS_SS58 : [ u8 ; 32 ] = [
23
+ 0xbc , 0x46 , 0x35 , 0x79 , 0xbc , 0x99 , 0xf9 , 0xee , 0x7c , 0x59 , 0xed , 0xee , 0x20 , 0x61 , 0xa3 ,
24
+ 0x09 , 0xd2 , 0x1e , 0x68 , 0xd5 , 0x39 , 0xb6 , 0x40 , 0xec , 0x66 , 0x46 , 0x90 , 0x30 , 0xab , 0x74 ,
25
+ 0xc1 , 0xdb ,
26
+ ] ;
27
+ }
28
+
23
29
#[ precompile_utils:: precompile]
24
30
impl NeuronPrecompile {
25
31
#[ precompile:: public( "setWeights(uint16,uint16[],uint16[],uint64)" ) ]
@@ -91,12 +97,3 @@ impl NeuronPrecompile {
91
97
handle. try_dispatch_runtime_call ( call, RawOrigin :: Signed ( coldkey) )
92
98
}
93
99
}
94
-
95
- impl PrecompileExt for NeuronPrecompile {
96
- const INDEX : u64 = 2052 ;
97
- const ADDRESS_SS58 : [ u8 ; 32 ] = [
98
- 0xbc , 0x46 , 0x35 , 0x79 , 0xbc , 0x99 , 0xf9 , 0xee , 0x7c , 0x59 , 0xed , 0xee , 0x20 , 0x61 , 0xa3 ,
99
- 0x09 , 0xd2 , 0x1e , 0x68 , 0xd5 , 0x39 , 0xb6 , 0x40 , 0xec , 0x66 , 0x46 , 0x90 , 0x30 , 0xab , 0x74 ,
100
- 0xc1 , 0xdb ,
101
- ] ;
102
- }
0 commit comments