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

feat: adding Oasis Sapphire and Oasis Sapphire Testnet support #589

Merged
merged 1 commit into from
Jul 21, 2023

Conversation

ElvisKrop
Copy link
Contributor

Please add Oasis Sapphire and Oasis Sapphire Testnet addresses:

Thank you!

@ElvisKrop ElvisKrop requested a review from a team as a code owner July 13, 2023 09:54
@ElvisKrop ElvisKrop requested review from Uxio0, moisses89 and akshay-ap and removed request for a team July 13, 2023 09:54
@moisses89
Copy link
Member

moisses89 commented Jul 17, 2023

@ElvisKrop I can't check the contracts in the following blockexplorer https://explorer.sapphire.oasis.io/address/0xfb1bffC9d739B8D520DaF37dF666da4C687191EA/transactions

@ElvisKrop
Copy link
Contributor Author

@ElvisKrop I can't check the contracts in the following blockexplorer https://explorer.sapphire.oasis.io/address/0xfb1bffC9d739B8D520DaF37dF666da4C687191EA/transactions

Hello @moisses89! Sorry for the delay, I was communicating with Oasis team to get some insights about this weird behaviour.
Unfortunately, Sapphire Explorer (Blockscout) can not know about contracts created by other contracts or used only as a library (e.g. only ever called from other contracts, but not via any transaction), because there are no transactions or events related to them. The only way to detect them is through EVM-tracing which would extract such information from the EVM state, but this has not been implemented yet.

However, you can explore safe-singleton-factory transactions. There are exactly 10 transactions for contract creations:

  1. SimulateTxAccessor
  2. GnosisSafeProxyFactory
  3. DefaultCallbackHandler
  4. CompatibilityFallbackHandler
  5. CreateCall
  6. MultiSend
  7. MultiSendCallOnly
  8. SignMessageLib
  9. GnosisSafeL2
  10. GnosisSafe

(note the reverse order of displayed transactions)

image

Moreover, you can get the code from the RPC node directly using next request:

curl --location --request POST 'https://sapphire.oasis.io/' \
--header 'Content-Type: application/json' \
--data-raw '{
	"jsonrpc":"2.0",
	"method":"eth_getCode",
	"params":[
		"0xfb1bffC9d739B8D520DaF37dF666da4C687191EA",
                "latest"
	],
	"id":1
}'

The result is the same if you will perform the same request to the Polygon RPC node (https://polygon-rpc.com).
Thanks in advance!

Copy link
Member

@moisses89 moisses89 left a comment

Choose a reason for hiding this comment

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

Please review the blocks, should be the block where the contract was created.

@@ -522,6 +522,14 @@
("0xfb1bffC9d739B8D520DaF37dF666da4C687191EA", 1511, "1.3.0+L2"),
("0x69f4D1788e39c87893C980c06EdF4b7f686e2938", 1512, "1.3.0"),
],
EthereumNetwork.OASIS_SAPPHIRE: [
("0xfb1bffC9d739B8D520DaF37dF666da4C687191EA", 330092, "1.3.0+L2"),
("0x69f4D1788e39c87893C980c06EdF4b7f686e2938", 330094, "1.3.0"),
Copy link
Member

Choose a reason for hiding this comment

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

@ElvisKrop thanks for your explanation here #589 (comment) My concern is not the code, because it was validated on safe-deployments PR, my concern is when was created, taking a look to your picture seems that the blocks that are harcoded here are incorrect, this block should be the creation block. I'd suggest 325640 and 325643.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

omg, sorry for that...
I was focused on the wrong topic 😅 haha
thanks for pointing! I'll update them shortly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@moisses89
✔️ blocks for oasis sapphire mainnet contracts are updated
✔️ I can confirm that block for testnet match the creation blocks of each contract too
✔️ PR branch is rebased

Hopefully, it is the final re-request for review 😄
Thank you!

Copy link
Member

@moisses89 moisses89 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@moisses89 moisses89 merged commit 7110225 into safe-global:master Jul 21, 2023
7 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 21, 2023
@ElvisKrop ElvisKrop deleted the oasis-sapphire-networks branch July 21, 2023 11:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants