0x000000000000000000000000000000000000080a
Subnet leasing: creates a lease crowdloan (Crowdloan::create wrapping SubtensorModule::register_leased_network), starts or terminates a lease (SubtensorModule::start_call / terminate_lease), and reads lease state and dividends.
Written from precompiles/src/leasing.rs (github.com, opens in a new tab, external site) at c004cebf3 (runtime 471)
Retired functions stay listed so older calls still decode.
createLeaseCrowdloan(uint64,uint64,uint64,uint32,uint8,bool,uint32)payable0xafed65f9Create a lease crowdloan.
Parameters
crowdloanDeposit (uint64) The deposit from the creator.crowdloanMinContribution (uint64) The minimum contribution required to contribute to the crowdloan.crowdloanCap (uint64) The maximum amount of funds that can be raised.crowdloanEnd (uint32) The block number at which the crowdloan will end.leasingEmissionsShare (uint8) The share of the emissions that the contributors will receive.hasLeasingEndBlock (bool) Whether the lease has an end block.leasingEndBlock (uint32) The block number at which the lease will end.getAccumulatedLeaseDividends(uint32)view0x5476deb6No documentation in the source.
Parameters
leaseId (uint32)Returns
return (uint64)getContributorShare(uint32,bytes32)view0x3175bd98Retrieves the contributor share for a given lease id and contributor. The share is returned as a tuple of two uint128 values, where the first value is the integer part and the second value is the fractional part.
Parameters
leaseId (uint32) The id of the lease to get contributor share for.contributor (bytes32) The contributor to get share for.Returns
return 1 (uint128) The contributor share.return 2 (uint128)getLease(uint32)view0xda2d4c2bRetrieves the lease info for a given lease id.
Parameters
leaseId (uint32) The id of the lease to get info for.Returns
return (tuple(bytes32 beneficiary, bytes32 coldkey, bytes32 hotkey, uint8 emissions_share, bool has_end_block, uint32 end_block, uint16 netuid, uint64 cost)) The lease info.getLeaseIdForSubnet(uint16)view0xe42363d5Retrieves the lease id for a given subnet.
Parameters
netuid (uint16) The subnet to get lease id for.Returns
return (uint32) The lease id.getNextLeaseId()view0x0d8dc643No documentation in the source.
Returns
return (uint32)startCall(uint16)nonpayable0x6f2c5e62No documentation in the source.
Parameters
netuid (uint16)terminateLease(uint32,bytes32)payable0x90cfa75bTerminates a lease and transfers the ownership to the beneficiary.
Parameters
leaseId (uint32) The id of the lease to terminate.hotkey (bytes32) The hotkey of beneficiary, it must be owned by the beneficiary coldkey.No calls on record.
Data: precompile-abis.v473. Runtime ranges are the spec versions on subtensor’s main branch when an entry first and last appeared, not the block it went live on chain.