Skip to content

Commit

Permalink
merge metadata changes in
Browse files Browse the repository at this point in the history
  • Loading branch information
0xdavinchee committed Nov 15, 2023
2 parents fffedd0 + 2295e0f commit eba67b0
Show file tree
Hide file tree
Showing 15 changed files with 84 additions and 23 deletions.
2 changes: 1 addition & 1 deletion packages/automation-contracts/autowrap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"dependencies": {
"@openzeppelin/contracts": "4.9.3",
"@superfluid-finance/ethereum-contracts": "1.8.1",
"@superfluid-finance/metadata": "1.1.18"
"@superfluid-finance/metadata": "1.1.19"
}
}
2 changes: 1 addition & 1 deletion packages/automation-contracts/scheduler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"dependencies": {
"@openzeppelin/contracts": "4.9.3",
"@superfluid-finance/ethereum-contracts": "1.8.1",
"@superfluid-finance/metadata": "1.1.18"
"@superfluid-finance/metadata": "1.1.19"
}
}
2 changes: 1 addition & 1 deletion packages/ethereum-contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"@safe-global/safe-service-client": "^2.0.3",
"@safe-global/safe-web3-lib": "^1.9.4",
"@superfluid-finance/js-sdk": "0.6.3",
"@superfluid-finance/metadata": "1.1.18",
"@superfluid-finance/metadata": "1.1.19",
"async": "^3.2.4",
"csv-writer": "^1.6.0",
"ethers": "^5.7.2",
Expand Down
8 changes: 8 additions & 0 deletions packages/hot-fuzz/contracts/SuperfluidTester.sol
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ contract SuperfluidTester {
}
}

function cfaLiquidate(address sender, address receiver) public {
superToken.deleteFlow(sender, receiver);
}

function setFlowPermissions(
address flowOperator,
bool allowCreate,
Expand Down Expand Up @@ -173,6 +177,10 @@ contract SuperfluidTester {
superToken.distributeFlow(from, pool, flowRate);
}

function gdaLiquidate(address sender, address receiver) public {
superToken.deleteFlow(sender, receiver);
}

// SuperfluidPool
function updateMemberUnits(ISuperfluidPool pool, address member, uint128 units) public {
pool.updateMemberUnits(member, units);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ abstract contract CFAHotFuzzMixin is HotFuzzBase {
testerA.flow(address(testerB), 0);
}

function liquidateFlow(uint8 a, uint8 b) public {
(SuperfluidTester testerA, SuperfluidTester testerB) = _getTwoTesters(a, b);

bool success = testerA.flow(address(testerB));
assert(success);
}

function setFlowPermissions(
uint8 a,
uint8 b,
Expand Down Expand Up @@ -63,11 +70,7 @@ abstract contract CFAHotFuzzMixin is HotFuzzBase {
) public {
(SuperfluidTester testerA, SuperfluidTester testerB) = _getTwoTesters(a, b);

testerA.increaseFlowRateAllowanceWithPermissions(
address(testerB),
permissionsToAdd,
addedFlowRateAllowance
);
testerA.increaseFlowRateAllowanceWithPermissions(address(testerB), permissionsToAdd, addedFlowRateAllowance);
}

function decreaseFlowRateAllowanceWithPermissions(
Expand All @@ -79,9 +82,7 @@ abstract contract CFAHotFuzzMixin is HotFuzzBase {
(SuperfluidTester testerA, SuperfluidTester testerB) = _getTwoTesters(a, b);

testerA.decreaseFlowRateAllowanceWithPermissions(
address(testerB),
permissionsToRemove,
subtractedFlowRateAllowance
address(testerB), permissionsToRemove, subtractedFlowRateAllowance
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/js-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"cloc": "sh tasks/cloc.sh"
},
"dependencies": {
"@superfluid-finance/metadata": "1.1.18",
"@superfluid-finance/metadata": "1.1.19",
"@truffle/contract": "4.6.29",
"auto-bind": "4.0.0",
"node-fetch": "2.7.0"
Expand Down
4 changes: 4 additions & 0 deletions packages/metadata/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to the metadata will be documented in this file.

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v1.1.19]
### Added
- `cliName` property under "subgraphV1" for the canonical subgraph network names, see [here](https://thegraph.com/docs/en/developing/supported-networks/#hosted-service)

## [v1.1.18]
### Fixed
- Changed the `module/networks/list.d.ts` file to correctly reflect the `contractsV1` object in our `networks.json` file.
Expand Down
16 changes: 16 additions & 0 deletions packages/metadata/main/networks/list.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module.exports =
"logsQueryRange": 10000,
"explorer": "https://goerli.etherscan.io",
"subgraphV1": {
"cliName": "goerli",
"name": "protocol-v1-goerli",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-goerli"
},
Expand Down Expand Up @@ -100,6 +101,7 @@ module.exports =
"logsQueryRange": 10000,
"explorer": "https://mumbai.polygonscan.com",
"subgraphV1": {
"cliName": "mumbai",
"name": "protocol-v1-mumbai",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-mumbai"
},
Expand Down Expand Up @@ -155,6 +157,7 @@ module.exports =
"logsQueryRange": 50000,
"explorer": "https://goerli-optimism.etherscan.io",
"subgraphV1": {
"cliName": "optimism-goerli",
"name": "protocol-v1-optimism-goerli",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-goerli"
},
Expand Down Expand Up @@ -197,6 +200,7 @@ module.exports =
"logsQueryRange": 50000,
"explorer": "https://goerli.arbiscan.io",
"subgraphV1": {
"cliName": "arbitrum-goerli",
"name": "protocol-v1-arbitrum-goerli",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-arbitrum-goerli"
},
Expand Down Expand Up @@ -242,6 +246,7 @@ module.exports =
"logsQueryRange": 50000,
"explorer": "https://testnet.snowtrace.io",
"subgraphV1": {
"cliName": "fuji",
"name": "protocol-v1-avalanche-fuji",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-avalanche-fuji"
},
Expand Down Expand Up @@ -282,6 +287,7 @@ module.exports =
"logsQueryRange": 10000,
"explorer": "https://sepolia.etherscan.io",
"subgraphV1": {
"cliName": "sepolia",
"name": "protocol-v1-eth-sepolia",
"satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/eth-sepolia/api"
},
Expand Down Expand Up @@ -355,6 +361,7 @@ module.exports =
"logsQueryRange": 20000,
"explorer": "https://testnet-zkevm.polygonscan.org/",
"subgraphV1": {
"cliName": "polygon-zkevm-testnet",
"name": "protocol-v1-polygon-zkevm-testnet"
},
"publicRPCs": ["https://rpc.public.zkevm-test.net"],
Expand Down Expand Up @@ -401,6 +408,7 @@ module.exports =
"logsQueryRange": 20000,
"explorer": "https://gnosisscan.io",
"subgraphV1": {
"cliName": "gnosis",
"name": "protocol-v1-xdai",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-xdai",
"satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/xdai/api"
Expand Down Expand Up @@ -459,6 +467,7 @@ module.exports =
"logsQueryRange": 10000,
"explorer": "https://polygonscan.com",
"subgraphV1": {
"cliName": "matic",
"name": "protocol-v1-matic",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-matic",
"satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/matic/api"
Expand Down Expand Up @@ -517,6 +526,7 @@ module.exports =
"logsQueryRange": 50000,
"explorer": "https://optimistic.etherscan.io",
"subgraphV1": {
"cliName": "optimism",
"name": "protocol-v1-optimism-mainnet",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-mainnet"
},
Expand Down Expand Up @@ -574,6 +584,7 @@ module.exports =
"logsQueryRange": 50000,
"explorer": "https://arbiscan.io",
"subgraphV1": {
"cliName": "arbitrum-one",
"name": "protocol-v1-arbitrum-one",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-arbitrum-one"
},
Expand Down Expand Up @@ -631,6 +642,7 @@ module.exports =
"logsQueryRange": 50000,
"explorer": "https://snowtrace.io",
"subgraphV1": {
"cliName": "avalanche",
"name": "protocol-v1-avalanche-c",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-avalanche-c"
},
Expand Down Expand Up @@ -688,6 +700,7 @@ module.exports =
"logsQueryRange": 5000,
"explorer": "https://bscscan.com",
"subgraphV1": {
"cliName": "bsc",
"name": "protocol-v1-bsc-mainnet",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-bsc-mainnet"
},
Expand Down Expand Up @@ -742,6 +755,7 @@ module.exports =
"logsQueryRange": 10000,
"explorer": "https://etherscan.io",
"subgraphV1": {
"cliName": "mainnet",
"name": "protocol-v1-eth-mainnet",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-eth-mainnet",
"satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/eth-mainnet/api"
Expand Down Expand Up @@ -794,6 +808,7 @@ module.exports =
"logsQueryRange": 20000,
"explorer": "https://celoscan.io",
"subgraphV1": {
"cliName": "celo",
"name": "protocol-v1-celo-mainnet",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-celo-mainnet"
},
Expand Down Expand Up @@ -830,6 +845,7 @@ module.exports =
"logsQueryRange": 20000,
"explorer": "https://basescan.org",
"subgraphV1": {
"cliName": "base",
"name": "protocol-v1-base-mainnet"
},
"publicRPCs": ["https://developer-access-mainnet.base.org"],
Expand Down
1 change: 1 addition & 0 deletions packages/metadata/module/networks/list.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ interface ContractAddresses {
}
interface SubgraphData {
readonly name: string;
readonly cliName?: string;
readonly hostedEndpoint?: string;
readonly satsumaEndpoint?: string;
}
Expand Down
16 changes: 16 additions & 0 deletions packages/metadata/module/networks/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export default
"logsQueryRange": 10000,
"explorer": "https://goerli.etherscan.io",
"subgraphV1": {
"cliName": "goerli",
"name": "protocol-v1-goerli",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-goerli"
},
Expand Down Expand Up @@ -100,6 +101,7 @@ export default
"logsQueryRange": 10000,
"explorer": "https://mumbai.polygonscan.com",
"subgraphV1": {
"cliName": "mumbai",
"name": "protocol-v1-mumbai",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-mumbai"
},
Expand Down Expand Up @@ -155,6 +157,7 @@ export default
"logsQueryRange": 50000,
"explorer": "https://goerli-optimism.etherscan.io",
"subgraphV1": {
"cliName": "optimism-goerli",
"name": "protocol-v1-optimism-goerli",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-goerli"
},
Expand Down Expand Up @@ -197,6 +200,7 @@ export default
"logsQueryRange": 50000,
"explorer": "https://goerli.arbiscan.io",
"subgraphV1": {
"cliName": "arbitrum-goerli",
"name": "protocol-v1-arbitrum-goerli",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-arbitrum-goerli"
},
Expand Down Expand Up @@ -242,6 +246,7 @@ export default
"logsQueryRange": 50000,
"explorer": "https://testnet.snowtrace.io",
"subgraphV1": {
"cliName": "fuji",
"name": "protocol-v1-avalanche-fuji",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-avalanche-fuji"
},
Expand Down Expand Up @@ -282,6 +287,7 @@ export default
"logsQueryRange": 10000,
"explorer": "https://sepolia.etherscan.io",
"subgraphV1": {
"cliName": "sepolia",
"name": "protocol-v1-eth-sepolia",
"satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/eth-sepolia/api"
},
Expand Down Expand Up @@ -355,6 +361,7 @@ export default
"logsQueryRange": 20000,
"explorer": "https://testnet-zkevm.polygonscan.org/",
"subgraphV1": {
"cliName": "polygon-zkevm-testnet",
"name": "protocol-v1-polygon-zkevm-testnet"
},
"publicRPCs": ["https://rpc.public.zkevm-test.net"],
Expand Down Expand Up @@ -401,6 +408,7 @@ export default
"logsQueryRange": 20000,
"explorer": "https://gnosisscan.io",
"subgraphV1": {
"cliName": "gnosis",
"name": "protocol-v1-xdai",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-xdai",
"satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/xdai/api"
Expand Down Expand Up @@ -459,6 +467,7 @@ export default
"logsQueryRange": 10000,
"explorer": "https://polygonscan.com",
"subgraphV1": {
"cliName": "matic",
"name": "protocol-v1-matic",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-matic",
"satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/matic/api"
Expand Down Expand Up @@ -517,6 +526,7 @@ export default
"logsQueryRange": 50000,
"explorer": "https://optimistic.etherscan.io",
"subgraphV1": {
"cliName": "optimism",
"name": "protocol-v1-optimism-mainnet",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-mainnet"
},
Expand Down Expand Up @@ -574,6 +584,7 @@ export default
"logsQueryRange": 50000,
"explorer": "https://arbiscan.io",
"subgraphV1": {
"cliName": "arbitrum-one",
"name": "protocol-v1-arbitrum-one",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-arbitrum-one"
},
Expand Down Expand Up @@ -631,6 +642,7 @@ export default
"logsQueryRange": 50000,
"explorer": "https://snowtrace.io",
"subgraphV1": {
"cliName": "avalanche",
"name": "protocol-v1-avalanche-c",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-avalanche-c"
},
Expand Down Expand Up @@ -688,6 +700,7 @@ export default
"logsQueryRange": 5000,
"explorer": "https://bscscan.com",
"subgraphV1": {
"cliName": "bsc",
"name": "protocol-v1-bsc-mainnet",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-bsc-mainnet"
},
Expand Down Expand Up @@ -742,6 +755,7 @@ export default
"logsQueryRange": 10000,
"explorer": "https://etherscan.io",
"subgraphV1": {
"cliName": "mainnet",
"name": "protocol-v1-eth-mainnet",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-eth-mainnet",
"satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/eth-mainnet/api"
Expand Down Expand Up @@ -794,6 +808,7 @@ export default
"logsQueryRange": 20000,
"explorer": "https://celoscan.io",
"subgraphV1": {
"cliName": "celo",
"name": "protocol-v1-celo-mainnet",
"hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-celo-mainnet"
},
Expand Down Expand Up @@ -830,6 +845,7 @@ export default
"logsQueryRange": 20000,
"explorer": "https://basescan.org",
"subgraphV1": {
"cliName": "base",
"name": "protocol-v1-base-mainnet"
},
"publicRPCs": ["https://developer-access-mainnet.base.org"],
Expand Down
Loading

0 comments on commit eba67b0

Please sign in to comment.