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

wip: Support registering external smart contracts #220

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alex-stone
Copy link
Contributor

@alex-stone alex-stone commented Dec 11, 2024

What changed? Why?

This starts to add support for registering external smart contracts
with CDP.

This will enable developers to use these register smart contracts
to invoke, read, and create webhooks associated with the contract!

Testing

# Deploy a token and get an ERC20 ABI ref
smart_contract = wallet.deploy_token(name: "Test Coin", symbol: "TEST", total_supply: 1000)
smart_contract.wait!

asset = Coinbase::Asset.fetch(:base_sepolia, :usdc)

# Register an external contract w/ a known ABI
external_contract = Coinbase::SmartContract.register(
  network: Coinbase::Network::BASE_SEPOLIA,
  contract_address: asset.address_id,
  name: "USDC YO",
  abi: smart_contract.abi
)

Qualified Impact

@cb-heimdall
Copy link

cb-heimdall commented Dec 11, 2024

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

This starts to add support for registering external smart contracts
with CDP.

This will enable developers to use these register smart contracts
to invoke, read, and create webhooks associated with the contract!
@alex-stone alex-stone force-pushed the stone/register-smart-contract branch from 1f89dfe to a94768c Compare December 11, 2024 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants