Skip to content

Commit 361eb04

Browse files
committed
[Chainlink] Custom-Logic-Automation
1 parent 92f3393 commit 361eb04

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

‎documents/Chainlink/Custom-Logic-Automation.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,22 @@ Custom logic upkeeps를 사용하면 스마트 컨트랙트 내부에 특수 조
99
- **유연성**: 시간 외에도 온체인 조건이나 조건의 조합 등 Solidity로 표현 가능한 모든 조건 사용 가능
1010

1111
---
12+
13+
## Custom Logic Automation 개념
14+
15+
### AutomationCompatibleInterface
16+
17+
컨트랙트가 custom logic automation과 호환되려면 `AutomationCompatibleInterface`를 상속하고 다음 두 함수를 구현해야 한다.
18+
19+
| 함수 | 역할 |
20+
| --------------- | --------------------------------------------------------------------------- |
21+
| `checkUpkeep` | upkeep 실행 준비 여부를 판단하는 로직. 준비되면 `true`, 아니면 `false` 반환 |
22+
| `performUpkeep` | Automation이 실행하는 upkeep 함수. 실제 수행 로직 포함 |
23+
24+
### 동작 흐름
25+
26+
1. Chainlink Automation이 주기적으로 `checkUpkeep` 호출
27+
2. `checkUpkeep`이 `true` 반환 → `performUpkeep` 실행
28+
3. `checkUpkeep`이 `false` 반환 → 아무 작업 없음
29+
30+
---

0 commit comments

Comments
 (0)