Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ETHEREUM-CONTRACTS/SDK-CORE/SUBGRAPH] Use more Typechain capabilities #1113

Merged
merged 4 commits into from Oct 12, 2022

Conversation

0xdavinchee
Copy link
Contributor

@0xdavinchee 0xdavinchee commented Oct 10, 2022

  • Provide end-consumer access to typechain files via ethereum-contracts as the origin source and also exported via sdk-core
  • no more abi file imports, using typechain generated factories all around
  • fix up lint scripts
  • add typechain build pipeline in ethereum-contracts

@github-actions
Copy link

📦 PR Packages

Install this PR (you need to setup Github packages):

yarn add @superfluid-finance/ethereum-contracts@PR1113
yarn add @superfluid-finance/sdk-core@PR1113
yarn add @superfluid-finance/sdk-redux@PR1113
:octocat: Click to learn how to use Github packages

To use the Github package registry, create a token with "read:packages" permission. See Creating a personal access token for help.

Next add these lines to your .npmrc file, replacing TOKEN with your personal access token. See Installing a package from Github if you get stuck.

@superfluid-finance:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=TOKEN

@0xdavinchee 0xdavinchee marked this pull request as draft October 10, 2022 11:02
@0xdavinchee 0xdavinchee marked this pull request as ready for review October 10, 2022 12:06
Copy link
Contributor

@tokdaniel tokdaniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome^^

@0xdavinchee 0xdavinchee marked this pull request as draft October 10, 2022 13:12
@0xdavinchee 0xdavinchee marked this pull request as ready for review October 10, 2022 15:30
@0xdavinchee 0xdavinchee changed the title [ETHEREUM-CONTRACTS/SDK-CORE/SUBGRAPH] Use more TypeChain capabilities [ETHEREUM-CONTRACTS/SDK-CORE/SUBGRAPH] Use more Typechain capabilities Oct 10, 2022
Copy link
Contributor

@kasparkallas kasparkallas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Please quickly host the TypeDoc somewhere so we could preview it.
  2. I wish there was a simple example available for consumers to generate TypeChain themselves from @superfluid-finance/ethereum-contracts without the bash script ABI extraction overhead. I could imagine someone wanting to generate TypeChain for hardhat or web3 or something else that is not pre-generated by us.

@@ -5,6 +5,17 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

## Unreleased

### Added

- CFA Hooks added (#1099)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's a "Hook"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check out the #1099 and also #1096

@@ -57,6 +55,7 @@
"url": "https://github.com/superfluid-finance/protocol-monorepo/issues"
},
"dependencies": {
"@superfluid-finance/ethereum-contracts": "1.4.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would think the published dev package will be broken if this is not incremented.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Please quickly host the TypeDoc somewhere so we could preview it.

will do this w/ netlify and post link when done

  1. I wish there was a simple example available for consumers to generate TypeDoc themselves from @superfluid-finance/ethereum-contracts without the bash script ABI extraction overhead. I could imagine someone wanting to generate TypeDoc for hardhat or web3 or something else that is not pre-generated by us.

Are you referring to SDK-CORE here? If yes, it is fairly simple to do this now and the bash script ABI extraction has been deleted from the SDK-Core. I am pretty sure if you have the project locally, you just have to run yarn build in ethereum-contracts and then yarn doc:html in sdk-core. Then you just have to run npx serve dist/docs in sdk-core to have this locally

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, we can increment the version in this PR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, for 2 I accidentally wrote "TypeDoc" but meant "TypeChain".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, for 2 I accidentally wrote "TypeDoc" but meant "TypeChain".

this never required a bash script ABI extraction to do so within @superfluid-finance/ethereum-contracts, you could simply run npx hardhat compile or npx hardhat typechain to get the typechain types for all contracts

this.address = address;
this.contract = new ethers.Contract(

this.contract = ERC20WithTokenInfo__factory.connect(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it good to connect the contract here? Aren't now all the contracts possibly connected to a signer? And when write operations are invoked then that signer is not used... unless there's an error in our code and we miss passing in the new signer in which case this signer is used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it good to connect the contract here? Aren't now all the contracts possibly connected to a signer?

yes, the contracts may be connected to a signer, but the proper use here is to connect a provider, so we can simply change the allowed type here if you think this is an issue.

And when write operations are invoked then that signer is not used...

However, let's say we don't do that and we allow the signer and we throw away the signer later, there is no issue with this as you have to do this anyways if you are switching between signers in the same session-one signer at start vs. different signer later at execution is pretty similar to no signer at start then signer on first write operation and different signer on subsequent or each write operation.

unless there's an error in our code and we miss passing in the new signer in which case this signer is used.

If the user of the product decides to execute transactions via the contract directly, this may be an issue and may warrant only allowing provider type to be passed on initialization.
However, if they are using our class and creating an Operation and doing .exec(), this will absolutely fail even if you cast it as any because you would be trying to execute .sendTransaction on an undefined object.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the benefit of connecting here though? It looks like the connection is always overriden anyways.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure that's a fair point.

Firstly: Some extra typecasting is avoided with .connect.
Code with .connect:

this.contract = ERC20WithTokenInfo__factory.connect(
    this.address,
    providerOrSigner
);

Code without .connect:

this.contract = new ethers.Contract(
    this.address,
    ERC20WithTokenInfo__factory.abi
) as ERC20WithTokenInfo;

Secondly, for write operations, I think this will always be overridden and it is probably safe to do this. However, by providing a provider/signer in the initialization of the contract, it opens up the possibility of not requiring the end user to pass a provider on reads. This does become more problematic if the consumer is on multiple chains but this can be pretty easily solved with just passing in a new provider.

Lastly, why not, this operation is not blocking and will not slow anything down - I see no good reason to not use this (imo) cleaner way of initializing a contract.

@@ -32,6 +32,7 @@ jobs:
run: |
yarn build:contracts-truffle
yarn build:contracts-hardhat
yarn build:typechain
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a blocking comment, but having the same build:* sequence across several places tickles DRY principle. something to tackle later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will resolve this in the same PR along w/ squashed commit - just does yarn build instead

Copy link
Contributor

@hellwolf hellwolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will unblock this since many people already reviewed.

@hellwolf
Copy link
Contributor

hellwolf commented Oct 12, 2022

The base branch requires all commits to be signed. Learn more about signing commits.

One could do a signed force commit that squashed everything in one to unblock this.

files typechain addition

files export correct path

Fix subgraph testing: copy upstream docker compose file (#1109)

[ETHEREUM-CONTRACTS] SuperfluidFrameworkDeployer Additions (#1104)

* Now SDK-CORE are testing using this deployer instead the web3-version of the deployer

Update of the nix flake tooling (#1108)

package.json script

Cleanup

* CHANGELOG.md for ethereum-contracts/SDK-core updated
* remove tsup from deps
* removed generate scripts from sdk-core/package.json
* No more json imports!
* no more custom.ts file!

fix lint script

* js lint script should explicitly point at needed config file

SDK-Core further cleanup

* pass in provider to all relevant classes with contracts
* use the factory.connect syntax
* remove IAgreementV1Options
* mention breaking change for direct `BatchCall` initialization

build fixes + eth-contracts test cleanup

* forgot to include providerOrSigner in IDA
* no more json in ethereum-contracts

fix build

* must build:typechain
* update changelog with knowledge of PR number

subgraph refactor

skip liquidation test in subgraph

delete flow

typedoc fix

remove .connect syntax

- Kaspar did not like the implicit nature of initializing classes with .connect() and I will gladly submit to get approval

missed BatchCall

Follow DRY principle w/ yarn build
@0xdavinchee 0xdavinchee merged commit 5713860 into dev Oct 12, 2022
@0xdavinchee 0xdavinchee deleted the typechain-refactoring branch October 12, 2022 13:44
@github-actions
Copy link

XKCD Comic Relif

Link: https://xkcd.com/1113
https://xkcd.com/1113

0xdavinchee added a commit that referenced this pull request Oct 14, 2022
#1113)

Provide end-consumer access to typechain files via ethereum-contracts as the origin source and also exported via sdk-core
no more abi file imports, using typechain generated factories all around
fix up lint scripts
add typechain build pipeline in ethereum-contracts
Co-authored-by: Daniel <tokdaniel4@gmail.com>
0xdavinchee added a commit that referenced this pull request Oct 17, 2022
* [JS-SDK] 再见 JS-SDK (#1072)
* Don't wrap SubgraphClient's errors with SFError (#1075)
* [SDK-CORE] 0.5.6 Patch Fix (#1074)
* Get Nix Pilled (#1073)
* [SDK-CORE] 0.5.6 Patch Fix (#1074)
* The Great TypeScript Refactor (#1069)
* Bump terser in /packages/sdk-redux-examples/sdk-redux-react-typecript (#1078)
* [ETHEREUM-CONTRACTS] _isPatricianPeriod Patch (#1080)
* fix tests expect (#1082)
* [ETHEREUM-CONTRACTS] backport 1.4.1 fixes (#1084)
* [JS-SDK] Half undo deprecation (#1098)
* [ETHEREUM-CONTRACTS] CFAv1Forwarder Fixes (#1094)
* Fix links to the examples repo (#1100)
* [ETHEREUM-CONTRACTS] CFA Hooks (#1099)
* Fix subgraph testing: copy upstream docker compose file (#1109)
* [ETHEREUM-CONTRACTS] SuperfluidFrameworkDeployer Additions (#1104)
* Update of the nix flake tooling (#1108)
* [ETHEREUM-CONTRACTS/SDK-CORE/SUBGRAPH] Use more Typechain capabilities (#1113)
* [ETHEREUM-CONTRACTS/SDK-CORE] CFAv1 Forwarder Integration (#1118)
* [ETHEREUM-CONTRACTS/SDK-CORE] Ethereum-Contracts 1.4.2 / SDK-Core 0.5.7 (#1119)
* further refactoring cleanup (#1081)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Kaspar Kallas <kaspar@superfluid.finance>
Co-authored-by: Miao ZhiCheng <miao@superfluid.finance>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Didi <git@d10r.net>
Co-authored-by: sffn3va <114768934+sffn3va@users.noreply.github.com>
Co-authored-by: tokdaniel <7677603+tokdaniel@users.noreply.github.com>
0xdavinchee added a commit that referenced this pull request Oct 17, 2022
* Subgraph data integrity validation (#661)
* Update dependencies (#930)
* Disable public shaming during weekends and some more data to slack bot (#947)
* Minor command update (#948)
* ci.feature + ci.canary cleanup (#949)
* [SDK-redux] Update example project references and add back WalletConnect (#942)
* Create Hardhat Deployer (#950)
* Update ci.canary.yml (#952)
* Resolver Set + Workflow Modifications (#951)
* add SetEvent to getAllEvents query (#953)
* Subgraph 1.4.4 Release Bump | SDK-Core 0.4.5 Release Bump (#955)
* Initialize logic contracts on deployment (using "castrate") (#841)
* [SDK-core] Compile AJV validations (#954)
* SDK-Core Build Fix (#963)
* [EXAMPLES] Fix sdk initializations (#946)
* bump sdk-core version to 0.5.0 (#964)
* isNativeAssetSuperToken added to Token entity (#968)
* Adds a missing closing parenthesis to example test (#967)
* [SDK-core] Refactor SFError to follow more conventional Error object structure (#960)
* Addresses several shortcomings in current worflows (mainly mainnet related) (#911)
* Add back the serialized error to SFError's message (#978)
* SDK-Core - isNativeAssetSuperToken query support (#970)
* [SDK-core] Use `serialize-error` (#983)
* fix handler.publish-release-packages (#985)
* Add missing stringify (#988)
* create operation from framework (#984)
* Test Framework Created Operation + Remove isNativeAssetSuperToken from query (#989)
* SDK-Core `isNativeAssetSuperToken` support (#992)
* bump subgraph and sdk-core versions for dev (#998)
* [spec-haskell] agreement framework refactored (#987)
* Update ci.canary.yml (#1000)
* [SDK-Core] Call App Action Support Added/Fixed CallAppAction BatchCall (#995)
* SDK-Core 0.5.2 Patch Fix and Version Bump (#1001)
* Update cd.hardhat-deployer-stable.create-release-drafts.yml (#1006)
* Release hardhat deployer stable (#1009)
* Add resolver and loader to deployer, add tests (#1011)
* actions/setup-node cache property added (#1002)
* Remove redundant deployments (#1014)
* specify cache-dependency-path (#1018)
* Ethereum 1.3.1 - for hardhat deployer update (#1016)
* Fix release branch (#1024)
* add tokenDecimals option to deploy-test-token.js (#1025)
* Map indexId to IndexSubscription (#1026)
* bump contract version, add test for loader (#1028)
* New TestSuperApp: stream redirector wip (#1008)
* #899 App Credit Rule CFA-2 (#945)
* [Sk-core patch fix (#1035)
* Adding Constant Flow Distribution Agreement etc. (#1017)
* Remove pesky error messages that and update readme (#1037)
* kwik patch (#1040)
* Deprecate networks (#1032)
* [TOGA] Added missing awaits (#1044)
* [SDK-core] Don't wrap transaction errors with `SFError` & don't serialize a massive internal error into `SFError` message (#1046)
* [SUBGRAPH] Update addresses.template.ts (#1047)
* Remove examples folder (#1045)
* [SDK-core] Specify name property for `SFError` (#1048)
* [ETHEREUM-CONTRACTS] Add gnosisscan support (#1050)
* Update README to link to examples repo (#1051)
* Fix the precious slack bot message (#1053)
* Update CHANGELOG.md (#1055)
* [ETHEREUM-CONTRACTS] Gov: Convenience method for app registration keys and some cleanup (#1049)
* remove hardhat deployer (#1057)
* [ETHEREUM-CONTRACTS] CFA Agreement Forwarder (#982)
* Remove MaticBridgedToken from monorepo (#1060)
* [ETHEREUM-CONTRACTS] Add Custom Errors (#1043)
* [ETHEREUM-CONTRACTS] yAcademy Gas Savings Applied (#1062)
* bump solc to 0.8.16 (#1065)
* Updating dependencies & dedup dev packages (#1064)
* fix build (#1067)
* [ETHEREUM-CONTRACTS] 1.4.0 Release (#1070)
* [JS-SDK] 再见 JS-SDK (#1072)
* Don't wrap SubgraphClient's errors with SFError (#1075)
* [SDK-CORE] 0.5.6 Patch Fix (#1074)
* Get Nix Pilled (#1073)
* [SDK-CORE] 0.5.6 Patch Fix (#1074)
* The Great TypeScript Refactor (#1069)
* Bump terser in /packages/sdk-redux-examples/sdk-redux-react-typecript (#1078)
* [ETHEREUM-CONTRACTS] _isPatricianPeriod Patch (#1080)
* fix tests expect (#1082)
* [ETHEREUM-CONTRACTS] backport 1.4.1 fixes (#1084)
* [JS-SDK] Half undo deprecation (#1098)
* [ETHEREUM-CONTRACTS] CFAv1Forwarder Fixes (#1094)
* Fix links to the examples repo (#1100)
* [ETHEREUM-CONTRACTS] CFA Hooks (#1099)
* Fix subgraph testing: copy upstream docker compose file (#1109)
* [ETHEREUM-CONTRACTS] SuperfluidFrameworkDeployer Additions (#1104)
* Update of the nix flake tooling (#1108)
* [ETHEREUM-CONTRACTS/SDK-CORE/SUBGRAPH] Use more Typechain capabilities (#1113)
* [ETHEREUM-CONTRACTS/SDK-CORE] CFAv1 Forwarder Integration (#1118)
* [ETHEREUM-CONTRACTS/SDK-CORE] Ethereum-Contracts 1.4.2 / SDK-Core 0.5.7 (#1119)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: elvijsTDL <77115130+elvijsTDL@users.noreply.github.com>
Co-authored-by: David A. Divas <62566465+Daldiv@users.noreply.github.com>
Co-authored-by: Miao ZhiCheng <miao@superfluid.finance>
Co-authored-by: Kaspar Kallas <kaspar@superfluid.finance>
Co-authored-by: Joshua Trujillo <Jtriley15@gmail.com>
Co-authored-by: Didi <git@d10r.net>
Co-authored-by: saflamini <43142465+saflamini@users.noreply.github.com>
Co-authored-by: FlacoJones <93455288+FlacoJones@users.noreply.github.com>
Co-authored-by: Axe <ngmachado@users.noreply.github.com>
Co-authored-by: Jonathan Gustafsson <jonathan@gustafsson.work>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: sffn3va <114768934+sffn3va@users.noreply.github.com>
Co-authored-by: tokdaniel <7677603+tokdaniel@users.noreply.github.com>
0xdavinchee added a commit that referenced this pull request Nov 14, 2022
* [JS-SDK] 再见 JS-SDK (#1072)

* Don't wrap SubgraphClient's errors with SFError (#1075)

* [SDK-CORE] 0.5.6 Patch Fix (#1074)

* fix subgraphAPIEndpoint for sdk-core

* Update constants.ts

* third time is the charm

* Update 5_subgraph.test.ts

* proper env variable name

* Update yarn.lock

* address comments

* isArbGoerli

* Get Nix Pilled (#1073)

* use nix flake to lock build toolchains such as yarn, foundry, ghc, etc.

* added nodejs 16 to dependencies

* add flakes/whitehat

* add flakes/whitehat

* devShells

* remove haskell tools

* [SDK-CORE] 0.5.6 Patch Fix (#1074)

* fix subgraphAPIEndpoint for sdk-core

* Update constants.ts

* third time is the charm

* Update 5_subgraph.test.ts

* proper env variable name

* Update yarn.lock

* address comments

* isArbGoerli

* updated contributing

* typo

Co-authored-by: 0xdavinchee <0xdavinchee@gmail.com>

* The Great TypeScript Refactor (#1069)

* TS WIP - testsuites

* tsconfig revamp
* convert testsuites files into TS
* fix up test:contracts:hardhat accordingly

* TS WIP - Typechain

* add typechain for ethereum-contracts

* TS WIP - UUPS and CallUtils

* convert UUPS test and CallUtils test file to typescript

* TS WIP - Utility Contract Tests

* convert utility contract tests to TypeScript
* remove file extension in all-contracts.ts
* add some helpers to helpers.js

* TS WIP - CFAv1Forwarder Tests

* convert CFAv1Forwarder contract tests to TypeScript

* TS WIP - Library Tests

* convert CFAv1Library and IDAv1Library contract tests to TypeScript

* TS WIP - Scenarios Tests

* convert scenarios tests to typescript

* TS WIP - Scenarios Tests

* convert scenarios tests to typescript

* TS WIP - SuperfluidGoverannceII tests

* convert SuperfluidGovernanceII contract tests to TypeScript

* TS WIP - Custom Tokens Tests

* convert custom token contract tests to TypeScript

* TS WIP - Superfluid Core Tests

* convert superfluid core tests to typescript
* use import instead of require in testsuite files

* TS WIP - Clean up commit pollution

* undo some of the variable renaming

* TS WIP - Clean up commit pollution (cont.)

* undo use of ethers over web3

* TS WIP - Clean up commit pollution (cont.)

* TS WIP - Token behavior files

* some cleanup
* mainly converted token behavior files

* TS WIP - CFA/IDA behavior files

* converted behavior files for CFA and IDA

* TS WIP - Convert peripheries

* convert CFADataModel, MFASupport, AgreementHelper, helpers, expectRevert to typescript

* TS WIP - Convert TestEnvironment

* convert TestEnvironment to typescript
* fix MFASupport import
* fix TestEnvironment imports
* remove module.exports from AgreementHelper

* TS WIP - Deprecate JS-SDK

remove js-sdk from:
- pr-artifact creation
- canary tests + coverage
- publish-pr-packages
- publish-release-packages
- codecov flag
- root package.json
- check-changeset.sh

* TS WIP - Add JS-SDK tests

* add tests that exist in js-sdk to sdk-core as part of deprecation

* TS WIP - Packages

* bump hardhat version
* lower js-sdk version

* TS WIP - Refactor Cleanup

* remove most explicit any's + add actual type
* separation of types from actual files in certain places where it is bloated
* BN refactor (passing in BigNumber to almost all funcs)
* .eslintrc.ts.json added to lint typescript test files
* lint fix files
* general type fixes

* remove parallel flag

* bump js-sdk version

* cleanup

* fix naming
* bump solidity-coverage version
* fix dead links

* Split cfa and ida test files

* split CFA and IDA test files into: callback vs non callback and mfa for cfa

* consistent file naming

* Bump terser in /packages/sdk-redux-examples/sdk-redux-react-typecript (#1078)

Bumps [terser](https://github.com/terser/terser) from 4.8.0 to 4.8.1.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](terser/terser@v4.8.0...v4.8.1)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [ETHEREUM-CONTRACTS] _isPatricianPeriod Patch (#1080)

* fix tests expect (#1082)

* this test just needs to know something is undefined
* in the workflow it lets us know which property is undefined, but locally it gives the original message: "Cannot read properties of undefined"

* further refactoring cleanup (#1081)

* use BigNumber almost everywhere
* use expect more
* remove js-sdk usage as much as possible
* remove web3 usage as much as possible

* [ETHEREUM-CONTRACTS] backport 1.4.1 fixes (#1084)

* [ETHEREUM-CONTRACTS] backport 1.4.1 fixes

- deployment scripts improvements
- [SECURITY] CFA: check flow sender instead of msg sender in order to cover ACL use

Co-authored-by: 0xdavinchee <0xdavinchee@gmail.com>

* fix build

fix build and add in patch fix test

* remove js and js-sdk

* fix imports

* purge js-sdk from readme.md

* just remove codecov badge

Co-authored-by: Didi <git@d10r.net>
Co-authored-by: 0xdavinchee <0xdavinchee@gmail.com>

* [JS-SDK] Half undo deprecation (#1098)

* Undo js-sdk deprecation

* half deprecate js-sdk

* remove JS-SDK from .github/workflows
* remove js-sdk from root level files
* fix undefined variable errors
* add JS-SDK test parity back in for SDK-Core
* tidy up README's
* remove build-abi-js.sh from bash files

* Update ci.feature.yml

* build!

* [ETHEREUM-CONTRACTS] CFAv1Forwarder Fixes (#1094)

* CFAV1Forwarder Fixes

* make _host and _cfa state variables immutable - these should not
* fix `_deleteFlow` logic
* fix natspec
* return true from _forwardBatchCall
* add comment about EIP 2771
* add CFAv1Forwarder tests
* add CFAv1Forwarder to deploy-framework + resolver

* require artifacts from hardhat

* pain

* use truffle build not hh artifacts

* hard code fix for now

* 👎

* undo js-sdk revert

* add CFAv1Forwader to js-sdk

* CFAv1Forwarder to js-sdk

* do this in a separate branch

* remove `protocolReleaseVersion`

* Fix links to the examples repo (#1100)

* [ETHEREUM-CONTRACTS] CFA Hooks (#1099)

* Fix subgraph testing: copy upstream docker compose file (#1109)

* [ETHEREUM-CONTRACTS] SuperfluidFrameworkDeployer Additions (#1104)

* Now SDK-CORE are testing using this deployer instead the web3-version of the deployer

* Update of the nix flake tooling (#1108)

* [ETHEREUM-CONTRACTS/SDK-CORE/SUBGRAPH] Use more Typechain capabilities (#1113)

Provide end-consumer access to typechain files via ethereum-contracts as the origin source and also exported via sdk-core
no more abi file imports, using typechain generated factories all around
fix up lint scripts
add typechain build pipeline in ethereum-contracts
Co-authored-by: Daniel <tokdaniel4@gmail.com>

* [ETHEREUM-CONTRACTS/SDK-CORE] CFAv1 Forwarder Integration (#1118)

* Agreement Forwarder Integration WIP

* Split supertoken tests into separate files
* Add CFAv1Forwarder to SuperfluidFrameworkDeployer + set in resolver and enable as trusted forwarder
* Integrate CFAv1Forwarder in SDK-Core
* tests to ensure that forwarder is being used and works as expected
* validateOperationShouldUseCallAgreement checks that we are using agreement forwarder

* Update CHANGELOG.md

* SDK-Core cleanup

Co-Authored-By: tokdaniel <7677603+tokdaniel@users.noreply.github.com>

* Fix them hardcoded addresses!

* two step fix

* Subgraph test setup cleanup

* delete test-subgraph.template, it is a duplicate
* rename prepare-local: prepare-manifest-local
* update ganache.json
* create runDeployContractsAndToken.ts to deploy framework and tokens and create new ganache.json dynamically
* no more hardcoded addresses in addresses.template.ts!
* helpers.ts modified to read ganache.json file to retrieve resolver address to setup framework

* must build sdk-core

* Fixes

* Make it properly dynamic by deploying and preparing local files prior to actual subgraph deployment
* fix up package.json given the above
* fix up readme

* build sdk-core before deploy contracts

* do not redeploy

* missed the other reusable workflow

* chainId unddefined?

* sender is not needed here

Co-authored-by: tokdaniel <7677603+tokdaniel@users.noreply.github.com>

* [ETHEREUM-CONTRACTS/SDK-CORE] Ethereum-Contracts 1.4.2 / SDK-Core 0.5.7 (#1119)

* bump sdk-core version

* update metadata for satsuma endpoint

* bump eth-contracts + changelog

* [SUBGRAPH] graph-node issue resolved by The Graph team (#1130)

pinned to 0.28.1: graphprotocol/graph-node#4034

* [SUBGRAPH] Revert Changes + Cleanup (#1131)

* Update Codeowners (#1132)

* Update Codeowners
- adding 0xdavinchee as co-codeowner of /packages/ethereum-contracts/
- adding @kasparkallas to js-sdk too as SDK co-owners.

* [SDK-CORE] Gas Multiplier (#1128)

* gas multiplier
* fix where we handle the gasLimit
* handle the gas limit modification one level deeper to not break other SDK-Core functionality
* address review comments

* [CI/SUBGRAPH] Workflow + Script for deploying to Satsuma endpoint (#1125)

* modify deploy-subgraph.yml
- modify workflow for deploy-subgraph to support new deploy-to-satsuma.sh bash script
* ci workflow cleanup
* Update handler.deploy-subgraph.yml
* address review comments

* [ETHEREUM-CONTRACTS] Hardcoded Hook Gas Limit (#1129)

* add option for CFA hook to deploy script
* hardcode `CFA_HOOK_GAS_LIMIT`
* test case added
* fix deployment test
* handle the magical 1/64 case
* blow up in catch
* fix deployment script
* simplification: make hook gas limit a constant
* fix flakey foundry invariant test
* the clipped deposits need to be bounded appropriately
* no mentions
* comment cleanup

Co-authored-by: didi <git@d10r.net>

* [SDK-CORE] Load w/ metadata (#1127)

* sdk-core load w/ metadata
* install graphql
* changelog + ethers mentioned
* address comments
* no more EMPTY_NETWORK_DATA

* Yellowpaper 1 - Denotational Semantics of General Payment Primitives, and Its Payment System (#1105)

* [CI] Changelog reminder handler (#1133)

* create changelog reminder handler
* changlog reminder handler
* cleanup of check-changeset.sh
* forgot to checkout monorepo
* bad syntax

Co-authored-by: Miao ZhiCheng <miao@superfluid.finance>

* CFA forwarder deployment related changes (#1117)

* improved tooling for same-address deployment of CFA forwarder

* ISSUE #1089 - Create2 Hybrid SuperTokenFactory (#1115)

* Contracts WIP

* `createCanonicalERC20Wrapper` and `computeWrapperSuperTokenAddress` implemented
* both functions added to `ISuperTokenFactory`

* canonical creation tests

* tests that compute works as expected
* tests create2 works as expected
* tests that we can only create canonical token once
* tests that we can create canonical erc20 wrappers for multiple tokens

* initialize list

* implementation for list initialization added
* tests added for list initialization

* fix flakey foundry invariant test

* the clipped deposits need to be bounded appropriately

* address review comments

* rename computeWrapperSuperTokenAddress to computeCanonicalERC20WrapperAddress
* fix up comments
* add new custom error code
* add getCanonicalERC20Wrapper function

* Address Review Comments

* Add warning about reordering storage layouts in all contracts which have upgradability
* Add note comments about adding tests to validateStorageLayout if proxy contract storage layout is touched
* Fix up tests given review comment logic changes

* typo fix

* address review comments

* add to readme
* remove "our" from vocabulary when referring to canonical erc20 wrapper list
* use ownable over SueprfluidGovernanceII

* remove InitializeData from ISuperTokenFactory.sol

* Remove SuperfluidErrors Library (#1142)

* Localize custom errors to individual contracts
* Modify tests accordingly
* Retain the name so that it is easy to debug which contract is throwing the error
* No more use of error codes as this is redundant given the above
* Comments with the hashed custom error name for quick debugging

* [SUBGRAPH] Event Entity Base Property Initialization Refactor (#1143)

* simple refactoring

* utilize entity.set in initializeEventEntity to cut down on code and duplication

* no upcast - must pass entity

* bad copy paste

* set non null account entity!

* review comments addressed!

* [ETHEREUM-CONTRACTS/JS-SDK] Contracts scripts typings + JS-SDK cleanup (#1144)

* Map deposit from Subgraph to Stream (#1145)

Co-authored-by: Miao ZhiCheng <miao@superfluid.finance>

* Yellowpaper v1.0: errata and grammatic fixes after reviews (#1148)

* [SDK-CORE/SDK-REDUX] Fix reference docs Cloudfront bucket ID & use single "@dev" for latest dev-build (#1146)

* Use new cloudfront distribution ID
* Use single dev-version instead of many specific dev-versions for ref docs

* Update sdk-redux dependencies and bump version (#1147)

* Bump apollo-server-core from 3.10.0 to 3.11.0 (#1149)

Bumps [apollo-server-core](https://github.com/apollographql/apollo-server/tree/HEAD/packages/apollo-server-core) from 3.10.0 to 3.11.0.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/apollo-server-core@3.11.0/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/commits/apollo-server-core@3.11.0/packages/apollo-server-core)

---
updated-dependencies:
- dependency-name: apollo-server-core
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [SDK-CORE] Mainnet Support | TODO: Reinstall @superfluid-finance/metadata (#1139)

* add mainnet to relevant workflow files (#1141)

Co-authored-by: Didi <git@d10r.net>

* [SUBGRAPH] Mainnet Support (#1140)

Co-authored-by: Didi <github@d10r.net>

* TOGAv3: use transfer and eliminate custodian - signed (#1150)

* minor cleanups

* remove .ts script file which broke the build

* undo yarn.lock

* fix tests

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Kaspar Kallas <kaspar@superfluid.finance>
Co-authored-by: Miao ZhiCheng <miao@superfluid.finance>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Didi <git@d10r.net>
Co-authored-by: sffn3va <114768934+sffn3va@users.noreply.github.com>
Co-authored-by: tokdaniel <7677603+tokdaniel@users.noreply.github.com>
Co-authored-by: Didi <github@d10r.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants