Skip to content

Commit 8231c0b

Browse files
committed
fix contract
1 parent 1591e88 commit 8231c0b

File tree

2 files changed

+118
-127
lines changed

2 files changed

+118
-127
lines changed

runtime/src/precompiles/solidity/subnet.abi

Lines changed: 116 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11
[
2+
{
3+
"inputs": [
4+
{
5+
"internalType": "uint16",
6+
"name": "netuid",
7+
"type": "uint16"
8+
}
9+
],
10+
"name": "getActivityCutoff",
11+
"outputs": [
12+
{
13+
"internalType": "uint16",
14+
"name": "",
15+
"type": "uint16"
16+
}
17+
],
18+
"stateMutability": "view",
19+
"type": "function"
20+
},
221
{
322
"inputs": [
423
{
@@ -80,6 +99,25 @@
8099
"stateMutability": "view",
81100
"type": "function"
82101
},
102+
{
103+
"inputs": [
104+
{
105+
"internalType": "uint16",
106+
"name": "netuid",
107+
"type": "uint16"
108+
}
109+
],
110+
"name": "getCommitRevealWeightsInterval",
111+
"outputs": [
112+
{
113+
"internalType": "uint64",
114+
"name": "",
115+
"type": "uint64"
116+
}
117+
],
118+
"stateMutability": "view",
119+
"type": "function"
120+
},
83121
{
84122
"inputs": [
85123
{
@@ -137,6 +175,25 @@
137175
"stateMutability": "view",
138176
"type": "function"
139177
},
178+
{
179+
"inputs": [
180+
{
181+
"internalType": "uint16",
182+
"name": "netuid",
183+
"type": "uint16"
184+
}
185+
],
186+
"name": "getLiquidAlphaEnabled",
187+
"outputs": [
188+
{
189+
"internalType": "bool",
190+
"name": "",
191+
"type": "bool"
192+
}
193+
],
194+
"stateMutability": "view",
195+
"type": "function"
196+
},
140197
{
141198
"inputs": [
142199
{
@@ -251,6 +308,25 @@
251308
"stateMutability": "view",
252309
"type": "function"
253310
},
311+
{
312+
"inputs": [
313+
{
314+
"internalType": "uint16",
315+
"name": "netuid",
316+
"type": "uint16"
317+
}
318+
],
319+
"name": "getNetworkPowRegistrationAllowed",
320+
"outputs": [
321+
{
322+
"internalType": "bool",
323+
"name": "",
324+
"type": "bool"
325+
}
326+
],
327+
"stateMutability": "view",
328+
"type": "function"
329+
},
254330
{
255331
"inputs": [
256332
{
@@ -348,6 +424,24 @@
348424
},
349425
{
350426
"inputs": [
427+
{
428+
"internalType": "bytes32",
429+
"name": "hotkey",
430+
"type": "bytes32"
431+
}
432+
],
433+
"name": "registerNetwork",
434+
"outputs": [],
435+
"stateMutability": "payable",
436+
"type": "function"
437+
},
438+
{
439+
"inputs": [
440+
{
441+
"internalType": "bytes32",
442+
"name": "hotkey",
443+
"type": "bytes32"
444+
},
351445
{
352446
"internalType": "bytes",
353447
"name": "subnetName",
@@ -362,20 +456,33 @@
362456
"internalType": "bytes",
363457
"name": "subnetContact",
364458
"type": "bytes"
459+
},
460+
{
461+
"internalType": "bytes",
462+
"name": "subnetUrl",
463+
"type": "bytes"
464+
},
465+
{
466+
"internalType": "bytes",
467+
"name": "discord",
468+
"type": "bytes"
469+
},
470+
{
471+
"internalType": "bytes",
472+
"name": "description",
473+
"type": "bytes"
474+
},
475+
{
476+
"internalType": "bytes",
477+
"name": "additional",
478+
"type": "bytes"
365479
}
366480
],
367481
"name": "registerNetwork",
368482
"outputs": [],
369483
"stateMutability": "payable",
370484
"type": "function"
371485
},
372-
{
373-
"inputs": [],
374-
"name": "registerNetwork",
375-
"outputs": [],
376-
"stateMutability": "payable",
377-
"type": "function"
378-
},
379486
{
380487
"inputs": [
381488
{
@@ -394,25 +501,6 @@
394501
"stateMutability": "payable",
395502
"type": "function"
396503
},
397-
{
398-
"inputs": [
399-
{
400-
"internalType": "uint16",
401-
"name": "netuid",
402-
"type": "uint16"
403-
}
404-
],
405-
"name": "getActivityCutoff",
406-
"outputs": [
407-
{
408-
"internalType": "uint16",
409-
"name": "",
410-
"type": "uint16"
411-
}
412-
],
413-
"stateMutability": "view",
414-
"type": "function"
415-
},
416504
{
417505
"inputs": [
418506
{
@@ -490,25 +578,6 @@
490578
"stateMutability": "payable",
491579
"type": "function"
492580
},
493-
{
494-
"inputs": [
495-
{
496-
"internalType": "uint16",
497-
"name": "netuid",
498-
"type": "uint16"
499-
}
500-
],
501-
"name": "getCommitRevealWeightsInterval",
502-
"outputs": [
503-
{
504-
"internalType": "uint64",
505-
"name": "",
506-
"type": "uint64"
507-
}
508-
],
509-
"stateMutability": "view",
510-
"type": "function"
511-
},
512581
{
513582
"inputs": [
514583
{
@@ -581,25 +650,6 @@
581650
"stateMutability": "payable",
582651
"type": "function"
583652
},
584-
{
585-
"inputs": [
586-
{
587-
"internalType": "uint16",
588-
"name": "netuid",
589-
"type": "uint16"
590-
}
591-
],
592-
"name": "getLiquidAlphaEnabled",
593-
"outputs": [
594-
{
595-
"internalType": "bool",
596-
"name": "",
597-
"type": "bool"
598-
}
599-
],
600-
"stateMutability": "view",
601-
"type": "function"
602-
},
603653
{
604654
"inputs": [
605655
{
@@ -726,25 +776,6 @@
726776
"stateMutability": "payable",
727777
"type": "function"
728778
},
729-
{
730-
"inputs": [
731-
{
732-
"internalType": "uint16",
733-
"name": "netuid",
734-
"type": "uint16"
735-
}
736-
],
737-
"name": "getNetworkPowRegistrationAllowed",
738-
"outputs": [
739-
{
740-
"internalType": "bool",
741-
"name": "",
742-
"type": "bool"
743-
}
744-
],
745-
"stateMutability": "view",
746-
"type": "function"
747-
},
748779
{
749780
"inputs": [
750781
{
@@ -852,46 +883,5 @@
852883
"outputs": [],
853884
"stateMutability": "payable",
854885
"type": "function"
855-
},
856-
{
857-
"inputs": [
858-
{
859-
"internalType": "bytes32",
860-
"name": "hotkey",
861-
"type": "bytes32"
862-
}
863-
],
864-
"name": "registerNetwork",
865-
"outputs": [],
866-
"stateMutability": "payable",
867-
"type": "function"
868-
},
869-
{
870-
"inputs": [
871-
{
872-
"internalType": "bytes32",
873-
"name": "hotkey",
874-
"type": "bytes32"
875-
},
876-
{
877-
"internalType": "bytes",
878-
"name": "subnetName",
879-
"type": "bytes"
880-
},
881-
{
882-
"internalType": "bytes",
883-
"name": "githubRepo",
884-
"type": "bytes"
885-
},
886-
{
887-
"internalType": "bytes",
888-
"name": "subnetContact",
889-
"type": "bytes"
890-
}
891-
],
892-
"name": "registerNetwork",
893-
"outputs": [],
894-
"stateMutability": "payable",
895-
"type": "function"
896-
}
897-
]
886+
}
887+
]

runtime/src/precompiles/solidity/subnet.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ address constant ISUBNET_ADDRESS = 0x0000000000000000000000000000000000000803;
44

55
interface ISubnet {
66
/// Registers a new network without specifying details.
7-
function registerNetwork() external payable;
7+
function registerNetwork(bytes32 hotkey) external payable;
88
/// Registers a new network with specified subnet name, GitHub repository, and contact information.
99
function registerNetwork(
10+
bytes32 hotkey,
1011
bytes memory subnetName,
1112
bytes memory githubRepo,
1213
bytes memory subnetContact,

0 commit comments

Comments
 (0)