2

I was reading about ink smart contracts and was curious is it possible to make bridge using ink, as there is already parity-common-bridges present. It would be very helpful if someone knows about this or can point to any documentation for the same.

1 Answer 1

1

I'm not sure if I understand correctly what you mean with "to make bridge using ink!", so I'll try to answer what I guess you mean.

So in the Substrate universe you would build a bridge to another chain as a Substrate runtime module and not as a smart contract. Those are two different things in Substrate. parity-common-bridges is a collection of Substrate modules (those are called "pallets" in Substrate terminology) to build a bridge.

Substrate has a number of other pallets, one of them is called pallet-contracts. It's a module that you can add to your Substrate runtime to give it smart contract capabilities. With ink! you can write smart contracts for this pallet-contracts.

Not every chain needs smart contracts, on Polkadot/Kusama many actually don't have a need for smart contracts because they realize this functionality purely within their Substrate runtime. For example, some chains don't have a need for users to execute programs which make use of the chain business logic (which is one reason why a chain would want to add smart contract capabilities).

I suspect that your questions stems from a confusion that people learning about Substrate often run into: that most things are implemented as a Substrate runtime and not as a smart contract.

There is a great answer to Smart Contracts vs. Runtimes on Substrate here: When should I build a Substrate Runtime Module versus a Substrate Smart Contract?.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.