<p>Okay. I think you are asking a couple different questions:</p>
<blockquote>
<p>Is there any keyword to get the epoch details or stake-pool details in Plutus Smart Contract?</p>
</blockquote>
<p>It really depends on what information you need. There are ways for a script to validate certain information about an epoch, e.g. check that the current slot is within a defined epoch.</p>
<p>For example, to check if you are past a deadline in a validator:</p>
<pre><code>from slot `contains` posixTimeRangeToSlotRange (txInfoValidRange (scriptContextTxInfo ctx))
</code></pre>
<p>will return <code>True</code> if the transaction takes place after a specified <code>slot</code>. And there are ways to convert an epoch to a slot.</p>
<p>There is also limited staking information in the <a href="https://github.com/input-output-hk/plutus/blob/master/plutus-ledger-api/src/Plutus/V1/Ledger/Contexts.hs#L118" rel="nofollow noreferrer">transaction context</a>.</p>
<hr />
<blockquote>
<p>I am trying to write a smart contract where I can get the awards for delegators of a particular stake pool. I need to know if that is right now possible to do using Plutus</p>
</blockquote>
<p>A smart contract can't withdraw awards on behalf of other delegators. The awarded ADA will be only be withdrawable by the wallets that have delegated the funds.</p>
<p>However, it is possible for a script to delegate its own funds. So, depending on the behavior you want, you could have a smart contract <em>delegate</em> on behalf of other delegators and get a similar behavior.</p>
<p>Hope that helps :)</p>

CC BY-SA 4.0
2021-07-27T08:00:28.787Z
Sorry if the question was put in a confusing way. Is there any way we can know how much a particular delegator earned (ADA) in an epoch from a particular staking pool. This is to be done using Plutus SC. I hope to be clearer this time.
Kuldeep Srivastava
CC BY-SA 4.0
2021-07-27T06:28:35.097Z
2021-07-27T07:03:51.923Z
2021-07-27T07:03:51.923Z
Mitchell Turner
<p>I am trying to write a smart contract where I can get the awards for delegators of a particular stake pool. I need to know if that is right now possible to do using Plutus, if yes, pls suggest me.</p>

CC BY-SA 4.0
2021-07-27T06:34:47.200Z
Hey Kuldeep. Welcome to the forum! I made an attempt to answer your questions, but I think I and the other contributors could answer better if you would be more specific with the type of epoch and stake-pool details you are looking for.
Mitchell Turner
<plutus><stake-pool><plutus-pioneer-program><plutus-playground><staking>
Is there any keyword to get the epoch details or stake-pool details in Plutus Smart Contract?
# Is there any keyword to get the epoch details or stake-pool details in Plutus Smart Contract?

(Asked by: username_0 on 2021-07-27)

I am trying to write a smart contract where I can get the awards for delegators of a particular stake pool. I need to know if that is right now possible to do using Plutus, if yes, pls suggest me.

**Tags:** plutus, stake-pool, plutus-pioneer-program, plutus-playground, staking
> **Comments:**
> **username_1**: Hey Kuldeep. Welcome to the forum! I made an attempt to answer your questions, but I think I and the other contributors could answer better if you would be more specific with the type of epoch and stake-pool details you are looking for.  

---

## 1 answers

### Answer by username_1 on 2021-07-27. Score: 1

Okay. I think you are asking a couple different questions:

Is there any keyword to get the epoch details or stake-pool details in Plutus Smart Contract?

It really depends on what information you need. There are ways for a script to validate certain information about an epoch, e.g. check that the current slot is within a defined epoch.
For example, to check if you are past a deadline in a validator:
from slot `contains` posixTimeRangeToSlotRange (txInfoValidRange (scriptContextTxInfo ctx))

will return True if the transaction takes place after a specified slot. And there are ways to convert an epoch to a slot.
There is also limited staking information in the transaction context.


I am trying to write a smart contract where I can get the awards for delegators of a particular stake pool. I need to know if that is right now possible to do using Plutus

A smart contract can't withdraw awards on behalf of other delegators. The awarded ADA will be only be withdrawable by the wallets that have delegated the funds.
However, it is possible for a script to delegate its own funds. So, depending on the behavior you want, you could have a smart contract delegate on behalf of other delegators and get a similar behavior.
Hope that helps :)

> **Comments:**
> **username_0**: Sorry if the question was put in a confusing way. Is there any way we can know how much a particular delegator earned (ADA) in an epoch from a particular staking pool. This is to be done using Plutus SC. I hope to be clearer this time.  

---

