Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 0 additions & 9 deletions evm-tests/src/subtensor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,15 +268,6 @@ export async function setMinDelegateTake(api: TypedApi<typeof devnet>, minDelega
assert.equal(minDelegateTake, await api.query.SubtensorModule.MinDelegateTake.getValue())
}

export async function becomeDelegate(api: TypedApi<typeof devnet>, ss58Address: string, keypair: KeyPair) {
const signer = getSignerFromKeypair(keypair)

const tx = api.tx.SubtensorModule.become_delegate({
hotkey: ss58Address
})
await waitForTransactionWithRetry(api, tx, signer)
}

export async function addStake(api: TypedApi<typeof devnet>, netuid: number, ss58Address: string, amount_staked: bigint, keypair: KeyPair) {
const signer = getSignerFromKeypair(keypair)
let tx = api.tx.SubtensorModule.add_stake({
Expand Down
4 changes: 1 addition & 3 deletions evm-tests/test/staking.precompile.reward.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { tao } from "../src/balance-math"
import {
forceSetBalanceToSs58Address, addNewSubnetwork, burnedRegister,
setTxRateLimit, setTempo, setWeightsSetRateLimit, setSubnetOwnerCut, setMaxAllowedUids,
setMinDelegateTake, becomeDelegate, setActivityCutoff, addStake, setWeight, rootRegister,
setMinDelegateTake, setActivityCutoff, addStake, setWeight, rootRegister,
startCall
} from "../src/subtensor"

Expand Down Expand Up @@ -52,8 +52,6 @@ describe("Test neuron precompile reward", () => {
await setActivityCutoff(api, netuid, 65535)
await setMaxAllowedUids(api, netuid, 65535)
await setMinDelegateTake(api, 0)
await becomeDelegate(api, convertPublicKeyToSs58(validator.publicKey), coldkey)
await becomeDelegate(api, convertPublicKeyToSs58(miner.publicKey), coldkey)
})

it("Staker receives rewards", async () => {
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// `spec_version`, and `authoring_version` are the same between Wasm and native.
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
// the compatible custom types.
spec_version: 307,
spec_version: 308,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down
Loading