-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #869 from nounsDAO/verbs-stream-escrow-subgraph
DRAFT: stream escrow subgraph
- Loading branch information
Showing
12 changed files
with
1,409 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
323 changes: 323 additions & 0 deletions
323
packages/nouns-contracts/abi/contracts/StreamEscrow.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,323 @@ | ||
[ | ||
{ | ||
"type": "constructor", | ||
"inputs": [ | ||
{ "name": "daoExecutor_", "type": "address", "internalType": "address" }, | ||
{ "name": "ethRecipient_", "type": "address", "internalType": "address" }, | ||
{ "name": "nounsRecipient_", "type": "address", "internalType": "address" }, | ||
{ "name": "nounsToken_", "type": "address", "internalType": "address" }, | ||
{ "name": "streamCreator_", "type": "address", "internalType": "address" }, | ||
{ "name": "minimumTickDuration_", "type": "uint32", "internalType": "uint32" } | ||
], | ||
"stateMutability": "nonpayable" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "allowedToCreateStream", | ||
"inputs": [{ "name": "", "type": "address", "internalType": "address" }], | ||
"outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], | ||
"stateMutability": "view" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "cancelStream", | ||
"inputs": [{ "name": "nounId", "type": "uint256", "internalType": "uint256" }], | ||
"outputs": [], | ||
"stateMutability": "nonpayable" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "cancelStreams", | ||
"inputs": [{ "name": "nounIds", "type": "uint256[]", "internalType": "uint256[]" }], | ||
"outputs": [], | ||
"stateMutability": "nonpayable" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "createStream", | ||
"inputs": [ | ||
{ "name": "nounId", "type": "uint256", "internalType": "uint256" }, | ||
{ "name": "streamLengthInTicks", "type": "uint16", "internalType": "uint16" } | ||
], | ||
"outputs": [], | ||
"stateMutability": "payable" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "currentTick", | ||
"inputs": [], | ||
"outputs": [{ "name": "", "type": "uint32", "internalType": "uint32" }], | ||
"stateMutability": "view" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "daoExecutor", | ||
"inputs": [], | ||
"outputs": [{ "name": "", "type": "address", "internalType": "address" }], | ||
"stateMutability": "view" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "ethRecipient", | ||
"inputs": [], | ||
"outputs": [{ "name": "", "type": "address", "internalType": "address" }], | ||
"stateMutability": "view" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "ethStreamEndingAtTick", | ||
"inputs": [{ "name": "tick", "type": "uint256", "internalType": "uint256" }], | ||
"outputs": [{ "name": "ethPerTick", "type": "uint128", "internalType": "uint128" }], | ||
"stateMutability": "view" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "ethStreamedPerTick", | ||
"inputs": [], | ||
"outputs": [{ "name": "", "type": "uint128", "internalType": "uint128" }], | ||
"stateMutability": "view" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "fastForwardStream", | ||
"inputs": [ | ||
{ "name": "nounId", "type": "uint256", "internalType": "uint256" }, | ||
{ "name": "ticksToForward", "type": "uint32", "internalType": "uint32" } | ||
], | ||
"outputs": [], | ||
"stateMutability": "nonpayable" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "forwardAll", | ||
"inputs": [], | ||
"outputs": [], | ||
"stateMutability": "nonpayable" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "forwardAllAndCreateStream", | ||
"inputs": [ | ||
{ "name": "nounId", "type": "uint256", "internalType": "uint256" }, | ||
{ "name": "streamLengthInTicks", "type": "uint16", "internalType": "uint16" } | ||
], | ||
"outputs": [], | ||
"stateMutability": "payable" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "getStream", | ||
"inputs": [{ "name": "nounId", "type": "uint256", "internalType": "uint256" }], | ||
"outputs": [ | ||
{ | ||
"name": "", | ||
"type": "tuple", | ||
"internalType": "struct IStreamEscrow.Stream", | ||
"components": [ | ||
{ "name": "ethPerTick", "type": "uint128", "internalType": "uint128" }, | ||
{ "name": "canceled", "type": "bool", "internalType": "bool" }, | ||
{ "name": "lastTick", "type": "uint32", "internalType": "uint32" } | ||
] | ||
} | ||
], | ||
"stateMutability": "view" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "isStreamActive", | ||
"inputs": [{ "name": "nounId", "type": "uint256", "internalType": "uint256" }], | ||
"outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], | ||
"stateMutability": "view" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "lastForwardTimestamp", | ||
"inputs": [], | ||
"outputs": [{ "name": "", "type": "uint48", "internalType": "uint48" }], | ||
"stateMutability": "view" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "minimumTickDuration", | ||
"inputs": [], | ||
"outputs": [{ "name": "", "type": "uint32", "internalType": "uint32" }], | ||
"stateMutability": "view" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "nounsRecipient", | ||
"inputs": [], | ||
"outputs": [{ "name": "", "type": "address", "internalType": "address" }], | ||
"stateMutability": "view" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "nounsToken", | ||
"inputs": [], | ||
"outputs": [{ "name": "", "type": "address", "internalType": "contract INounsToken" }], | ||
"stateMutability": "view" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "rescueToken", | ||
"inputs": [ | ||
{ "name": "token", "type": "address", "internalType": "address" }, | ||
{ "name": "to", "type": "address", "internalType": "address" }, | ||
{ "name": "amount", "type": "uint256", "internalType": "uint256" } | ||
], | ||
"outputs": [], | ||
"stateMutability": "nonpayable" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "setAllowedToCreateStream", | ||
"inputs": [ | ||
{ "name": "address_", "type": "address", "internalType": "address" }, | ||
{ "name": "allowed", "type": "bool", "internalType": "bool" } | ||
], | ||
"outputs": [], | ||
"stateMutability": "nonpayable" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "setDAOExecutorAddress", | ||
"inputs": [{ "name": "newAddress", "type": "address", "internalType": "address" }], | ||
"outputs": [], | ||
"stateMutability": "nonpayable" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "setETHRecipient", | ||
"inputs": [{ "name": "newAddress", "type": "address", "internalType": "address" }], | ||
"outputs": [], | ||
"stateMutability": "nonpayable" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "setNounsRecipient", | ||
"inputs": [{ "name": "newAddress", "type": "address", "internalType": "address" }], | ||
"outputs": [], | ||
"stateMutability": "nonpayable" | ||
}, | ||
{ | ||
"type": "event", | ||
"name": "AllowedToCreateStreamChanged", | ||
"inputs": [ | ||
{ "name": "address_", "type": "address", "indexed": false, "internalType": "address" }, | ||
{ "name": "allowed", "type": "bool", "indexed": false, "internalType": "bool" } | ||
], | ||
"anonymous": false | ||
}, | ||
{ | ||
"type": "event", | ||
"name": "DAOExecutorAddressSet", | ||
"inputs": [ | ||
{ "name": "newAddress", "type": "address", "indexed": false, "internalType": "address" } | ||
], | ||
"anonymous": false | ||
}, | ||
{ | ||
"type": "event", | ||
"name": "ETHRecipientSet", | ||
"inputs": [ | ||
{ "name": "newAddress", "type": "address", "indexed": false, "internalType": "address" } | ||
], | ||
"anonymous": false | ||
}, | ||
{ | ||
"type": "event", | ||
"name": "ETHStreamedToDAO", | ||
"inputs": [ | ||
{ "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" } | ||
], | ||
"anonymous": false | ||
}, | ||
{ | ||
"type": "event", | ||
"name": "NounsRecipientSet", | ||
"inputs": [ | ||
{ "name": "newAddress", "type": "address", "indexed": false, "internalType": "address" } | ||
], | ||
"anonymous": false | ||
}, | ||
{ | ||
"type": "event", | ||
"name": "StreamCanceled", | ||
"inputs": [ | ||
{ "name": "nounId", "type": "uint256", "indexed": true, "internalType": "uint256" }, | ||
{ "name": "amountToRefund", "type": "uint256", "indexed": false, "internalType": "uint256" }, | ||
{ | ||
"name": "ethStreamedPerTick", | ||
"type": "uint128", | ||
"indexed": false, | ||
"internalType": "uint128" | ||
} | ||
], | ||
"anonymous": false | ||
}, | ||
{ | ||
"type": "event", | ||
"name": "StreamCreated", | ||
"inputs": [ | ||
{ "name": "nounId", "type": "uint256", "indexed": true, "internalType": "uint256" }, | ||
{ "name": "totalAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, | ||
{ | ||
"name": "streamLengthInTicks", | ||
"type": "uint16", | ||
"indexed": false, | ||
"internalType": "uint16" | ||
}, | ||
{ "name": "ethPerTick", "type": "uint256", "indexed": false, "internalType": "uint256" }, | ||
{ | ||
"name": "newEthStreamedPerTick", | ||
"type": "uint128", | ||
"indexed": false, | ||
"internalType": "uint128" | ||
}, | ||
{ "name": "lastTick", "type": "uint32", "indexed": false, "internalType": "uint32" } | ||
], | ||
"anonymous": false | ||
}, | ||
{ | ||
"type": "event", | ||
"name": "StreamFastForwarded", | ||
"inputs": [ | ||
{ "name": "nounId", "type": "uint256", "indexed": true, "internalType": "uint256" }, | ||
{ "name": "ticksToForward", "type": "uint256", "indexed": false, "internalType": "uint256" }, | ||
{ "name": "newLastTick", "type": "uint256", "indexed": false, "internalType": "uint256" }, | ||
{ | ||
"name": "ethStreamedPerTick", | ||
"type": "uint128", | ||
"indexed": false, | ||
"internalType": "uint128" | ||
} | ||
], | ||
"anonymous": false | ||
}, | ||
{ | ||
"type": "event", | ||
"name": "StreamsForwarded", | ||
"inputs": [ | ||
{ "name": "currentTick", "type": "uint256", "indexed": false, "internalType": "uint256" }, | ||
{ | ||
"name": "ethPerTickStreamEnded", | ||
"type": "uint256", | ||
"indexed": false, | ||
"internalType": "uint256" | ||
}, | ||
{ | ||
"name": "nextEthStreamedPerTick", | ||
"type": "uint256", | ||
"indexed": false, | ||
"internalType": "uint256" | ||
}, | ||
{ | ||
"name": "lastForwardTimestamp", | ||
"type": "uint256", | ||
"indexed": false, | ||
"internalType": "uint256" | ||
} | ||
], | ||
"anonymous": false | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.