git.delta.rocks / unique-network / refs/commits / c01d30bfd844

difftreelog

source

doc/re-enable_ink_contracts.md2.1 KiBsourcehistory
1## Re-Enabling Ink! Contracts23Uncomment following lies:41. In node/rpc/Cargo.toml5```6# pallet-contracts-rpc = { version = "3.0", git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.9' }7```892. In node/rpc/src/lib.rs10```11// C::Api: pallet_contracts_rpc::ContractsRuntimeApi<Block, AccountId, Balance, BlockNumber, Hash>,12...13// use pallet_contracts_rpc::{Contracts, ContractsApi};14...15// io.extend_with(ContractsApi::to_delegate(Contracts::new(client.clone())));1617```18193. In runtime/Cargo.toml20```21    # 'pallet-contracts/std',22    # 'pallet-contracts-primitives/std',23    # 'pallet-contracts-rpc-runtime-api/std',24    # 'pallet-contract-helpers/std',25...26    # [dependencies.pallet-contracts]27    # git = 'https://github.com/paritytech/substrate'28    # default-features = false29    # branch = 'polkadot-v0.9.9'30    # version = '3.0.0'3132    # [dependencies.pallet-contracts-primitives]33    # git = 'https://github.com/paritytech/substrate'34    # default-features = false35    # branch = 'polkadot-v0.9.9'36    # version = '3.0.0'3738    # [dependencies.pallet-contracts-rpc-runtime-api]39    # git = 'https://github.com/paritytech/substrate'40    # default-features = false41    # branch = 'polkadot-v0.9.9'42    # version = '3.0.0'43...44    # pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }45```46474. runtime/src/lib.rs48```49// use pallet_contracts::weights::WeightInfo;50...51// pub use pallet_timestamp::Call as TimestampCall;52...53// mod chain_extension;54// use crate::chain_extension::{NFTExtension, Imbalance};55...56/*57parameter_types! {58	pub TombstoneDeposit: Balance = deposit(59  ...60}61*/62...63//pallet_contract_helpers::ContractSponsorshipHandler<Runtime>,64...65// impl pallet_contract_helpers::Config for Runtime {}66...67// Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>},68...69// ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage},70...71//pallet_contract_helpers::ContractHelpersExtension<Runtime>,72...73/*74	impl pallet_contracts_rpc_runtime_api::ContractsApi<Block, AccountId, Balance, BlockNumber, Hash>75		for Runtime76	{77    ...78	}79*/8081```