Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
19f09f1
Add pallet-contracts dependency
silva-fj Aug 27, 2025
7d65d8f
Integrate contracts pallet into runtime
silva-fj Aug 27, 2025
d241271
Add contracts genesis config to localnet
silva-fj Aug 27, 2025
27c2510
fix(chain-spec): remove empty contracts from localnet config
silva-fj Aug 28, 2025
ac2089a
Configure contracts pallet with call filter and custom schedule
silva-fj Sep 2, 2025
594c930
feat(runtime): add Subtensor chain extension for contracts
silva-fj Sep 11, 2025
f13e1a0
docs(runtime): clarify comment for smart contracts support
silva-fj Sep 15, 2025
ceca15e
refactor(runtime): rename ContractSchedule to ContractsSchedule
silva-fj Sep 15, 2025
587ee48
docs: add smart contracts documentation
silva-fj Sep 15, 2025
1b6aec5
fix docs
silva-fj Sep 15, 2025
c8ca999
feat(runtime): update code hash lockup deposit percent to 30
silva-fj Sep 18, 2025
af86928
feat(runtime): customize contract storage deposit calculation
silva-fj Sep 18, 2025
c569dac
feat(runtime): expand contract call whitelist for staking operations
silva-fj Sep 18, 2025
ef563d3
docs: document expanded contract call whitelist
silva-fj Sep 18, 2025
12788fc
fix(runtime): remove create_pure from proxy call filter
silva-fj Sep 24, 2025
395d6a1
Merge upstream/devnet-ready into feature/add-pallet-contracts
silva-fj Sep 29, 2025
8693c7c
Merge remote-tracking branch 'upstream/devnet-ready' into feature/add…
silva-fj Oct 8, 2025
33b0083
Add DoNotBreakSmartContracts trait for contract API stability
silva-fj Oct 13, 2025
4c0109b
Merge remote-tracking branch 'upstream/devnet-ready' into feature/add…
silva-fj Oct 13, 2025
2610ac1
docs(contracts): remove Proxy::create_pure from allowed calls
silva-fj Oct 13, 2025
a490159
refactor(runtime): rename DoNotBreakSmartContracts trait
silva-fj Oct 13, 2025
cf70929
refactor(runtime): remove DoNotBreakSmartContractsV1 trait
silva-fj Oct 15, 2025
cf30094
build: add chain-extensions workspace member
silva-fj Oct 15, 2025
da84eed
feat(chain-extensions): add chain extensions crate
silva-fj Oct 15, 2025
7e7c364
feat(chain-extensions): add FunctionId and Outcome types
silva-fj Oct 15, 2025
bab0039
feat(chain-extensions): implement staking chain extensions
silva-fj Oct 15, 2025
3724e33
refactor(chain-ext): rename Outcome to Output
silva-fj Oct 15, 2025
c6547fd
build(chain-ext): add test dependencies
silva-fj Oct 16, 2025
2279c43
refactor(chain-ext): introduce testable extension environment trait
silva-fj Oct 16, 2025
dab4c46
test(chain-ext): add test infrastructure and test suite
silva-fj Oct 16, 2025
8e55f84
refactor(runtime): replace chain extension with subtensor-chain-exten…
silva-fj Oct 16, 2025
8dd3c5c
refactor(contracts): remove SubtensorModule calls from whitelist
silva-fj Oct 16, 2025
4e7e913
docs(contracts): document all chain extension functions and error codes
silva-fj Oct 16, 2025
20cfeb3
Merge upstream/devnet-ready into feature/add-pallet-contracts
silva-fj Oct 16, 2025
68b89f8
fix(chain-extensions): make types module public
silva-fj Oct 17, 2025
61219e7
fix(chain-extensions): return correct success code
silva-fj Oct 17, 2025
673d8c4
refactor(mock): clean up unused imports
silva-fj Oct 17, 2025
e542ed5
chore(chain-extensions): add no_std support
silva-fj Oct 17, 2025
0fd04bf
refactor(chain-extensions): remove unused mock utilities
silva-fj Oct 17, 2025
6a60750
feat(chain-extensions): add AddProxyV1 function ID and error codes
silva-fj Oct 18, 2025
2d975b7
build(chain-extensions): add pallet-subtensor-proxy dependency
silva-fj Oct 18, 2025
ea31d42
feat(chain-extensions): implement AddProxyV1 chain extension
silva-fj Oct 18, 2025
7e89630
test(chain-extensions): add proxy pallet to test runtime
silva-fj Oct 18, 2025
0724349
test(chain-extensions): add test for AddProxyV1
silva-fj Oct 18, 2025
00dc850
docs: add AddProxyV1 to chain extension documentation
silva-fj Oct 18, 2025
61b5541
refactor(runtime): remove add_proxy from contract call filter
silva-fj Oct 18, 2025
24e87c6
chore: update Cargo.lock
silva-fj Oct 18, 2025
73e9387
feat(chain-extensions): add RemoveProxyV1 function ID and error code
silva-fj Oct 18, 2025
f919287
feat(chain-extensions): implement RemoveProxyV1 chain extension
silva-fj Oct 18, 2025
0a362f2
test(chain-extensions): add test for RemoveProxyV1
silva-fj Oct 18, 2025
49b07bd
docs: add RemoveProxyV1 to chain extension documentation
silva-fj Oct 18, 2025
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
93 changes: 88 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ members = [
"primitives/*",
"runtime",
"support/*",
"chain-extensions",
]
resolver = "2"

Expand Down Expand Up @@ -68,6 +69,7 @@ subtensor-precompiles = { default-features = false, path = "precompiles" }
subtensor-runtime-common = { default-features = false, path = "common" }
subtensor-swap-interface = { default-features = false, path = "pallets/swap-interface" }
subtensor-transaction-fee = { default-features = false, path = "pallets/transaction-fee" }
subtensor-chain-extensions = { default-features = false, path = "chain-extensions" }

ed25519-dalek = { version = "2.1.0", default-features = false }
async-trait = "0.1"
Expand Down Expand Up @@ -115,6 +117,7 @@ expander = "2"
ahash = { version = "0.8", default-features = false }
regex = { version = "1.11.1", default-features = false }
ethereum = { version = "0.18.2", default-features = false }
num_enum = { version = "0.7.4", default-features = false }

frame = { package = "polkadot-sdk-frame", git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2503-6", default-features = false }
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2503-6", default-features = false }
Expand Down Expand Up @@ -145,6 +148,7 @@ pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2503-6", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2503-6", default-features = false }
pallet-root-testing = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2503-6", default-features = false }
pallet-contracts = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2503-6", default-features = false }

# NPoS
frame-election-provider-support = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2503-6", default-features = false }
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ This repository contains Bittensor's substrate-chain. Subtensor contains the tru
1. Runs Bittensor's [consensus mechanism](./docs/consensus.md);
2. Advertises neuron information, IPs, etc., and
3. Facilitates value transfer via TAO.
4. Supports wasm smart contract functionality via `pallet-contracts` (see [contracts documentation](./docs/contracts.md)).

## System Requirements

Expand Down
66 changes: 66 additions & 0 deletions chain-extensions/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[package]
name = "subtensor-chain-extensions"
version = "0.1.0"
edition.workspace = true
authors = ['Francisco Silva <[email protected]>']
homepage = "https://taostats.io/"
publish = false
repository = "https://github.com/opentensor/subtensor/"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
frame-support.workspace = true
frame-system.workspace = true
log.workspace = true
sp-core.workspace = true
sp-io.workspace = true
sp-runtime.workspace = true
sp-std.workspace = true
codec = { workspace = true, features = ["derive"] }
scale-info = { workspace = true, features = ["derive"] }
subtensor-runtime-common.workspace = true
pallet-contracts.workspace = true
pallet-subtensor.workspace = true
pallet-subtensor-swap.workspace = true
pallet-balances.workspace = true
pallet-scheduler.workspace = true
pallet-preimage.workspace = true
pallet-timestamp.workspace = true
pallet-crowdloan.workspace = true
pallet-subtensor-utility.workspace = true
pallet-subtensor-proxy.workspace = true
pallet-drand.workspace = true
subtensor-swap-interface.workspace = true
num_enum.workspace = true

[lints]
workspace = true

[features]
default = ["std"]
std = [
"frame-support/std",
"frame-system/std",
"log/std",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
"codec/std",
"scale-info/std",
"subtensor-runtime-common/std",
"pallet-contracts/std",
"pallet-subtensor/std",
"pallet-subtensor-swap/std",
"pallet-balances/std",
"pallet-scheduler/std",
"pallet-preimage/std",
"pallet-timestamp/std",
"pallet-crowdloan/std",
"pallet-subtensor-utility/std",
"pallet-subtensor-proxy/std",
"pallet-drand/std",
"subtensor-swap-interface/std",
]
Loading