superfluid-finance / custom-supertokens Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
Take https://github.com/superfluid-finance/protocol-monorepo/blob/dev/packages/ethereum-contracts/contracts/tokens/MaticBridgedNativeSuperToken.sol away from ethereum-contracts repo.
Previous work: superfluid-finance/protocol-monorepo#494
Upgrade project to use Hardhat
Background: currently none of our custom super token examples show that you can make custom super token logic upgradable. This is the ticket to address that.
After supporting Toki with the creation of a custom Pure SuperToken, this are some observations of potential pitfalls / sources of confusion:
SuperTokenBase
is not a very descriptive name / the role of that contract isn't explained well enough. Users of it should understand it's a proxy and contains storage paddings. Also don't assume everybody is already familiar with proxy, link to a good explanation of the concept.SuperTokenBase
may be more confusing than helpful. If kept, it should be well documented what this is and how it works. Explain that with the proxy constructions, this external calls are kind of like super.x() calls into base contracts in "normal" contracts.ethereum-contracts
validates examples to make sure we update examples as needed.hardhat-example/
hardhat full examples, and foundry-example/
minimum foundry example.Please start to reuse the utils/SuperfluidFrameworkDeployer.sol
from the ethereum-contracts 1.2.1 release.
See test/foundry/FoundrySuperfluidTester.sol
for its example usage.
I was able to easily deploy a supertoken using these scripts but unfortnuately verify the contracts is proving to be difficult. I'm creating this issue to report that and to ask if you know how to verify these contract @ngmachado. I think it stems from using web3tx. Without easy verification it makes working with the token on mumbai polygonscan difficult.
And remove scripts/utils/constants.js
closes #26
Vijay: seems like Etherscan have stopped supporting the automatic proxy verification, you might have to click "is this a proxy?" and letting it match the default one for super token wrappers for etherscan interactions for a while...
https://discord.com/channels/752490247643725875/752493319657095168/1089949208464867418
Could this be why I'm suddenly having an issue verifying supertokens on Goerli?
$ npx truffle run --network goerli verify BurnMintSuperToken@0xA862f128b3ffE9719948869cc1C7CBC21860Cd9a --custom-proxy BurnMintSuperToken
Verifying contracts on etherscan
Verifying BurnMintSuperToken@0xA862f128b3ffE9719948869cc1C7CBC21860Cd9a
Verifying custom proxy contract BurnMintSuperToken at 0xA862f128b3ffE9719948869cc1C7CBC21860Cd9a
Verifying proxy implementation BurnMintSuperToken at 0xdcde53f3b5e275109ff105f4dcab6925fc62791a
Invalid constructor arguments provided. Please verify that they are in ABI-encoded format
Failed to verify 1 contract(s): BurnMintSuperToken@0xA862f128b3ffE9719948869cc1C7CBC21860Cd9a
Or is this something related to how constructor args might have been done on token deployment. I think I might have done something wrong on deployment.
We need to fix the tests.
Also from the logs, i see a lot of compiler downloading attempts.
This repo has JS code without semicolons and tab indentation, enforced by a commit hook.
Should be changed to reflect the code style in other SF repos.
Also, we may want a more conventional setup with eslint instead of this somewhat opaque setup with husky in a commit hook (or at least document it).
This project should take 4 weeks of development time to get to a functional MVP
https://whimsical.com/super-token-wizard-FxPFgUiRnQthXs6VHdXeaT
$1000 in USDC on Polygon
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.