Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions abi/contracts/Broken.sol/Broken.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"stateMutability": "payable",
"type": "receive"
}
]
7 changes: 6 additions & 1 deletion abi/contracts/Factory.sol/Factory.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
"name": "title",
"type": "string"
},
{
"internalType": "address",
"name": "_fallback",
"type": "address"
},
{
"components": [
{
Expand All @@ -54,7 +59,7 @@
"type": "uint32"
}
],
"internalType": "struct Stream.Member[]",
"internalType": "struct SafeStream.Member[]",
"name": "members",
"type": "tuple[]"
}
Expand Down
115 changes: 115 additions & 0 deletions abi/contracts/SafeStream.sol/SafeStream.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
[
{
"inputs": [],
"name": "TransferFailed",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "f",
"type": "address"
}
],
"name": "changeFallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "uint32",
"name": "value",
"type": "uint32"
},
{
"internalType": "uint32",
"name": "total",
"type": "uint32"
}
],
"internalType": "struct SafeStream.Member[]",
"name": "m",
"type": "tuple[]"
},
{
"internalType": "address",
"name": "f",
"type": "address"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "members",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "uint32",
"name": "value",
"type": "uint32"
},
{
"internalType": "uint32",
"name": "total",
"type": "uint32"
}
],
"internalType": "struct SafeStream.Member[]",
"name": "",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "membersList",
"outputs": [
{
"internalType": "string[]",
"name": "member_info",
"type": "string[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "c",
"type": "uint256"
}
],
"name": "setHardGasCap",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
]
31 changes: 31 additions & 0 deletions abi/contracts/Stream.sol/Stream.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@
"name": "TransferFailed",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "f",
"type": "address"
}
],
"name": "changeFallback",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
Expand All @@ -27,6 +40,11 @@
"internalType": "struct Stream.Member[]",
"name": "m",
"type": "tuple[]"
},
{
"internalType": "address",
"name": "f",
"type": "address"
}
],
"name": "initialize",
Expand Down Expand Up @@ -64,6 +82,19 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "c",
"type": "uint256"
}
],
"name": "setHardCap",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
Expand Down
23 changes: 23 additions & 0 deletions buildshipxmoneypipe.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//////////////////////////////////////////////////////////////////////////////////////
// //
// SafeStream by buildship.xyz //
// //
//////////////////////////////////////////////////////////////////////////////////////
// //
// ██████  ██  ██ ██ ██  ██████  ███████ ██  ██ ██ ██████ //
// ██   ██ ██  ██ ██ ██  ██   ██ ██      ██  ██ ██ ██   ██ //
// ██████  ██  ██ ██ ██  ██  ██ ███████ ███████ ██ ██████ //
// ██   ██ ██  ██ ██ ██  ██  ██      ██ ██   ██ ██ ██ //
// ██████   ██████  ██ ███████ ██████  ███████ ██  ██ ██ ██ //
// //
// contract based on //
// //
// ███  ███  ██████  ███  ██ ███████ ██  ██ ██████  ██ ██████  ███████ //
// ████  ████ ██    ██ ████  ██ ██       ██  ██  ██   ██ ██ ██   ██ ██ //
// ██ ████ ██ ██  ██ ██ ██  ██ █████   ████   ██████  ██ ██████  █████ //
// ██  ██  ██ ██  ██ ██  ██ ██ ██      ██   ██      ██ ██      ██ //
// ██      ██  ██████  ██   ████ ███████  ██  ██  ██ ██  ███████ //
// //
// https://moneypipe.xyz //
// //
//////////////////////////////////////////////////////////////////////////////////////
9 changes: 9 additions & 0 deletions contracts/Broken.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

contract Broken {
receive() external payable {
revert("NOT ACCEPTING TRANSFERS");
}

}
36 changes: 23 additions & 13 deletions contracts/Factory.sol
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/proxy/Clones.sol";
import "./Stream.sol";
import "./SafeStream.sol";

contract Factory {
event ContractDeployed(address indexed owner, address indexed group, string title);
address public immutable implementation;
constructor() {
implementation = address(new Stream());
}
function genesis(string calldata title, Stream.Member[] calldata members) external returns (address) {
address payable clone = payable(Clones.clone(implementation));
Stream s = Stream(clone);
s.initialize(members);
emit ContractDeployed(msg.sender, clone, title);
return clone;
}
event ContractDeployed(
address indexed owner,
address indexed group,
string title
);
address public immutable implementation;

constructor() {
implementation = address(new SafeStream());
}

function genesis(string calldata title, address _fallback, SafeStream.Member[] calldata members)
external
returns (address)
{
address payable clone = payable(Clones.clone(implementation));
SafeStream s = SafeStream(clone);
s.initialize(members, _fallback);
emit ContractDeployed(msg.sender, clone, title);
return clone;
}
}
Loading