Skip to content

Commit

Permalink
refactor(contracts,py-sdk): update id -> stream_id in Stream events
Browse files Browse the repository at this point in the history
  • Loading branch information
fubuloubu committed Sep 28, 2024
1 parent 5d17c1b commit 8cb68c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions contracts/StreamManager.vy
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ capabilities: public(HashMap[address, Ability])


event StreamCreated:
id: indexed(uint256)
stream_id: indexed(uint256)
owner: indexed(address)
token: indexed(IERC20)
funded_amount: uint256
Expand All @@ -88,27 +88,27 @@ event StreamCreated:


event StreamOwnershipUpdated:
id: indexed(uint256)
stream_id: indexed(uint256)
old: indexed(address)
new: indexed(address)


event StreamFunded:
id: indexed(uint256)
stream_id: indexed(uint256)
funder: indexed(address)
funded_amount: uint256
time_left: uint256


event StreamClaimed:
id: indexed(uint256)
stream_id: indexed(uint256)
claimer: indexed(address)
is_expires: indexed(bool)
claim_amount: uint256


event StreamCancelled:
id: indexed(uint256)
stream_id: indexed(uint256)
canceller: indexed(address)
reason: indexed(bytes32)
refund_amount: uint256
Expand Down
4 changes: 2 additions & 2 deletions sdk/py/apepay/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def create(

# NOTE: Does not require tracing (unlike `.return_value`)
log = tx.events.filter(self.contract.StreamCreated)[-1]
return Stream(manager=self, id=log.id)
return Stream(manager=self, id=log.stream_id)

def _parse_stream_decorator(self, app: "SilverbackApp", container: ContractEvent):

Expand All @@ -215,7 +215,7 @@ def decorator(f):
@app.on_(container)
@wraps(f)
def inner(log):
return f(Stream(manager=self, id=log.id))
return f(Stream(manager=self, id=log.stream_id))

return inner

Expand Down

0 comments on commit 8cb68c9

Please sign in to comment.