Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4bc07b4
make proxies `DispatchClass::Normal`
JohnReedV Feb 4, 2026
a51cb15
make batches `DispatchClass::Normal`
JohnReedV Feb 4, 2026
7e1f7c6
Update pallets/utility/src/lib.rs
JohnReedV Feb 4, 2026
6077716
fix test
JohnReedV Feb 4, 2026
7044dc5
fmt
JohnReedV Feb 4, 2026
16dc8bb
Update pallets/utility/src/lib.rs
JohnReedV Feb 5, 2026
0d42661
Update pallets/utility/src/lib.rs
JohnReedV Feb 5, 2026
f75ff81
Update pallets/utility/src/lib.rs
JohnReedV Feb 5, 2026
0523069
Update pallets/utility/src/lib.rs
JohnReedV Feb 5, 2026
219d4d9
Update pallets/utility/src/lib.rs
JohnReedV Feb 5, 2026
011756c
fmt
JohnReedV Feb 5, 2026
b51a068
raise fee on `set_pending_childkey_cooldown`
JohnReedV Feb 5, 2026
4db45fe
bump psdk/frontier hashes
l0r1s Feb 5, 2026
198ac7e
Merge pull request #2404 from opentensor/fix-txpool-node
sam0x17 Feb 5, 2026
4dd4d03
downgrade dispatch classes fromn operational to normal
l0r1s Feb 6, 2026
54504b6
Merge pull request #2400 from opentensor/proxy-batch-dispatch-class-n…
sam0x17 Feb 6, 2026
6e827da
downgrade all operational to normal
l0r1s Feb 7, 2026
eed8eca
fix precompiles
l0r1s Feb 10, 2026
5cddfdb
bump spec version
l0r1s Feb 10, 2026
582d7e6
add more allowed prefixes
l0r1s Feb 10, 2026
c2f6d52
bump spec version
l0r1s Feb 10, 2026
b462045
added sudo/multisig/timestamp
l0r1s Feb 10, 2026
9e16f42
Merge pull request #2409 from opentensor/root-only-operational
sam0x17 Feb 11, 2026
36b8b8c
Merge branch 'main' into update-precompiles
sam0x17 Feb 11, 2026
8f60c45
Merge pull request #2416 from opentensor/update-precompiles
sam0x17 Feb 11, 2026
0560be2
Merge remote-tracking branch 'origin/initialize-pending-block' into d…
sam0x17 Feb 12, 2026
2ca55d9
bump spec version
sam0x17 Feb 12, 2026
efef9d6
commit Cargo.lock
sam0x17 Feb 12, 2026
b2e2cde
Merge pull request #2421 from opentensor/testnet
sam0x17 Feb 12, 2026
426cbcf
Merge branch 'main' into main-into-devnet-ready-17-02-2026
l0r1s Feb 17, 2026
e9baff0
bump spec version
l0r1s Feb 17, 2026
b942cf0
fix precompile test
l0r1s Feb 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
820 changes: 410 additions & 410 deletions Cargo.lock

Large diffs are not rendered by default.

428 changes: 214 additions & 214 deletions Cargo.toml

Large diffs are not rendered by default.

347 changes: 325 additions & 22 deletions contract-tests/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions contract-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"@polkadot-labs/hdkd": "^0.0.25",
"@polkadot-labs/hdkd-helpers": "^0.0.25",
"@polkadot/api": "^16.4.6",
"@polkadot/util-crypto": "^14.0.1",
"@types/mocha": "^10.0.10",
"dotenv": "17.2.1",
"ethers": "^6.13.5",
Expand Down
41 changes: 40 additions & 1 deletion contract-tests/test/runtime.call.precompile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { PublicClient } from "viem";
import { PolkadotSigner, TypedApi, getTypedCodecs } from "polkadot-api";
import { convertPublicKeyToSs58 } from "../src/address-utils"
import { forceSetBalanceToEthAddress, setMaxChildkeyTake, burnedRegister, forceSetBalanceToSs58Address, addStake, setTxRateLimit, addNewSubnetwork, startCall, setTempo } from "../src/subtensor";
import { xxhashAsHex } from "@polkadot/util-crypto";

describe("Test the dispatch precompile", () => {
let publicClient: PublicClient;
Expand Down Expand Up @@ -62,6 +63,45 @@ describe("Test the dispatch precompile", () => {
assert.equal(aliceBalance + transferAmount, aliceBalanceAfterTransfer)
})

it("Storage query only allow some pallets prefixed storage", async () => {
const authorizedKeys = [
await api.query.SubtensorModule.TotalNetworks.getKey(),
await api.query.Swap.FeeRate.getKey(),
await api.query.Balances.TotalIssuance.getKey(),
await api.query.Proxy.Announcements.getKey(),
await api.query.Scheduler.Agenda.getKey(),
await api.query.Drand.Pulses.getKey(),
await api.query.Crowdloan.Crowdloans.getKey(),
await api.query.Sudo.Key.getKey(),
await api.query.Multisig.Multisigs.getKey(),
await api.query.Timestamp.Now.getKey(),
];

for (const key of authorizedKeys) {
await assert.doesNotReject(
publicClient.call({
to: ISTORAGE_QUERY_ADDRESS,
data: key.toString() as `0x${string}`,
})
);
}

const unauthorizedKeys = [
await api.query.System.Events.getKey(),
await api.query.Grandpa.CurrentSetId.getKey(),
xxhashAsHex(":code" , 128),
];

for (const key of unauthorizedKeys) {
await assert.rejects(
publicClient.call({
to: ISTORAGE_QUERY_ADDRESS,
data: key.toString() as `0x${string}`,
})
);
}
})


it("Value type storage query call via precompile contract works correctly", async () => {
const key = await api.query.SubtensorModule.MaxChildkeyTake.getKey();
Expand Down Expand Up @@ -112,7 +152,6 @@ describe("Test the dispatch precompile", () => {
const totalHotkeyAlphaValueCodec = codec.query.SubtensorModule.TotalHotkeyAlpha.value;
const decodedValue = totalHotkeyAlphaValueCodec.dec(rawResultData);
assert.equal(totalHotkeyAlphaOnChain, decodedValue, "value should be the same as on chain")

})

// Polkadot api can't decode the boolean type for now.
Expand Down
651 changes: 286 additions & 365 deletions contract-tests/yarn.lock

Large diffs are not rendered by default.

Loading
Loading