-
Notifications
You must be signed in to change notification settings - Fork 38
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
Kinto integration #363
Closed
Closed
Kinto integration #363
Conversation
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
fedealconada
commented
Apr 22, 2024
Thanks for the PR, since this has a lot of kinto specific logic I dont think we should merge the code into main. I think it is best to maintain a fork under your org and take up deployment + ownership on kinto. |
fedealconada
force-pushed
the
master
branch
2 times, most recently
from
April 24, 2024 09:50
4adf95e
to
e0ea35d
Compare
fedealconada
force-pushed
the
master
branch
7 times, most recently
from
May 15, 2024 18:31
89efed8
to
e0857b4
Compare
chore: use custom errors
fedealconada
force-pushed
the
master
branch
2 times, most recently
from
May 20, 2024 15:44
7bcdb7e
to
ad647be
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Kinto only allows transactions from account abstraction-powered wallets. Externally owned accounts (EOA) are disabled for greater security and to provide a uniform, delightful user experience.
Since EOAs are disabled at chain level, all deployments need to be done using some sort of factory contract. Kinto has the
KintoWalletFactory
convenience contract which exposes adeployContract
function suitable for deploying any contract and also compatible with ownable contracts which expose thetransferOwnership()
function. Contracts implementing custom "ownable" functionalities would require implementing a custom factory to transfer ownership to a different address.Description
This PR modifies Socket's deployment scripts to work with Kinto's requirements; Every time there's a deployment or a call that modifies the chain state, we replace it with a
handleOps()
call to Kinto's EntryPoint.Since Socket uses a custom 2-step
Ownable
contract we have includedKintoDeployer.sol
which is a convenience contract that simply exposes adeploy
function which performsCREATE2
deployments and nominates an address for ownership.Requirements before running the deployment scripts
SOCKET_SIGNER_KEY
env var with the signer's private keySOCKET_OWNER_ADDRESS
env var with your Kinto Wallet (note that this is not the address of theSOCKET_SIGNER_KEY
but your Kinto WalletHow to run
1). On
config.ts
, on thechains
array, comment all the chains except forKinto
2). Resolve TODOs
3). Run
bash deploy.sh
(*) in oder for the Kinto team to create a Kinto wallet for you, run `npx ts-node ./scripts/deploy/utils/kinto/sign.ts and share the signature with them (so the contract can verify that the request is indeed coming from your signer address)