<p>PAB stands for Plutus Application <strong>Backend</strong> and as a backend is nothing more than a server responding to requests.</p>
<p>The PAB takes care of smart contract interaction through the creation of transactions.</p>
<p>Onchain we have scripts that lock outputs with logic. The scripts have a corresponding address linked to the hash of the script. When someone tries to spend an output at this address, the script has to evaluate to true given its inputs. In the PAB a contract comprises the logic on how to construct a transaction given one or more scripts. In general, we thus do not call it deploying the contract, since it lives off-chain.</p>
<p>A good thing to remember is that transactions in Cardano have no side effects, they are pure and deterministic in their behavior. Because Cardano uses the eUTxO model, wallets have to build transactions where in account model blockchains function call can be made that perform an action that might give access to all your funds.</p>
<p>So, to interact with a script, you just have to send funds to the corresponding script address and spend it according to the logic of it. It doesn't matter whether these transactions are constructed using the client, the PAB or even using JavaScript in the browser, the choice is yours. As to how to use the PAB for this, take a look at <a href="https://github.com/input-output-hk/plutus-apps/tree/main/plutus-pab" rel="nofollow noreferrer">(1)</a>.</p>

CC BY-SA 4.0
2022-07-13T06:52:05.513Z
2022-07-13T14:12:40.917Z
2022-07-13T14:12:40.917Z
Michele Nuzzi
<p>Before the Vasil HF (and without script references), there is no real deployment of smart contracts.</p>
<p>The way it works is that you can create outputs at your contract script address just like Michele described - by sending funds to the contract address.</p>
<p>But spending those outputs requires to supply the script to be attached to the transaction. It will be ran to validate if spending from that address is valid or not.</p>
<p>Until we don't have script references (Vasil HF) this is the process of using plutus scripts. Once, script references are available you can actually upload your Plutus script to the chain and are not required to attach it for every following spending transaction.</p>
<p>More information can be found <a href="https://cips.cardano.org/cips/cip33/" rel="nofollow noreferrer">here</a>.</p>

CC BY-SA 4.0
2022-07-13T07:30:18.440Z
2022-07-13T07:30:18.440Z
Will
<p>I've seen a tutorial where a smart-contract was uploaded to Cardano Blockchain using cardano-cli, so I would like to do the same thing using plutus PAB. How would I do that? The tutorial on lecture 6 from PPP only shows using a local machine, don't show how to do it in a blockchain.</p>

<blockchain><pab>
Upload Smartcontract to Blockchain
# Upload Smartcontract to Blockchain

(Asked by: username_0 on 2022-07-13)

I've seen a tutorial where a smart-contract was uploaded to Cardano Blockchain using cardano-cli, so I would like to do the same thing using plutus PAB. How would I do that? The tutorial on lecture 6 from PPP only shows using a local machine, don't show how to do it in a blockchain.

**Tags:** blockchain, pab

---

## 2 answers

### Answer by username_1 on 2022-07-13. Score: 1

PAB stands for Plutus Application **Backend** and as a backend is nothing more than a server responding to requests.

The PAB takes care of smart contract interaction through the creation of transactions.

Onchain we have scripts that lock outputs with logic. The scripts have a corresponding address linked to the hash of the script. When someone tries to spend an output at this address, the script has to evaluate to true given its inputs. In the PAB a contract comprises the logic on how to construct a transaction given one or more scripts. In general, we thus do not call it deploying the contract, since it lives off-chain.

A good thing to remember is that transactions in Cardano have no side effects, they are pure and deterministic in their behavior. Because Cardano uses the eUTxO model, wallets have to build transactions where in account model blockchains function call can be made that perform an action that might give access to all your funds.

So, to interact with a script, you just have to send funds to the corresponding script address and spend it according to the logic of it. It doesn't matter whether these transactions are constructed using the client, the PAB or even using JavaScript in the browser, the choice is yours. As to how to use the PAB for this, take a look at [(1)](https://github.com/input-output-hk/plutus-apps/tree/main/plutus-pab).


---

### Answer by username_2 on 2022-07-13. Score: 0

Before the Vasil HF (and without script references), there is no real deployment of smart contracts.

The way it works is that you can create outputs at your contract script address just like Michele described - by sending funds to the contract address.

But spending those outputs requires to supply the script to be attached to the transaction. It will be ran to validate if spending from that address is valid or not.

Until we don't have script references (Vasil HF) this is the process of using plutus scripts. Once, script references are available you can actually upload your Plutus script to the chain and are not required to attach it for every following spending transaction.

More information can be found [here](https://cips.cardano.org/cips/cip33/).


---

