The contract is stored on the ledger on the Blockchain . So, whenever a transaction happens, a function is invoked that calls the smart contract and the processing is done. Smart Contracts are stored on the Blockchain because it is important for the contract to be available to the people making transactions.
Read moreDo smart contracts have addresses?
An important aspect of how smart contracts work in Ethereum is that they have their own address in the blockchain . In other words, contract code is not carried inside each transaction that makes use of it.
Read moreHow is a smart contract address generated?
The contract address is usually given when a contract is deployed to the Ethereum Blockchain. The address comes from the creator’s address and the number of transactions sent from that address (the “nonce”) .
Read more