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

Release V0.11.0 #219

Merged
merged 4 commits into from
Nov 27, 2024
Merged

Release V0.11.0 #219

merged 4 commits into from
Nov 27, 2024

Conversation

alex-stone
Copy link
Contributor

What changed? Why?

Added

  • Add support for funding wallets (Alpha feature release)
    • Must reach out to CDP SDK Discord channel to be considered for this feature.

Fixed

  • Fix Smart Contract reads with no ABI specified.

Changes

#216
#217
#215
#218

Qualified Impact

### What changed? Why?

This bumps the OpenAPI client version and fixes the client API names

* `Wallet Stake` => `MPC Wallet Stake`
* `Validators` -> `Stake`

#### Qualified Impact
<!-- Please evaluate what components could be affected and what the
impact would be if there was an
error. How would this error be resolved, e.g. rollback a deploy, push a
new fix, disable a feature
flag, etc... -->
This should have no impact and should be a no-op
### What changed? Why?

This fixes Smart Contract reads with no ABI specified. We support using
ABIs from our deployed smart contracts and well known asset standards,
namely ERC20, ERC721, and ERC1155 token contracts.

### How to test this

Make a request to read a well known ERC20 asset without specifying an
ABI:
```
asset = Coinbase::Asset.fetch('base-sepolia', 'usdc')

Coinbase::SmartContract.read(
  network: Coinbase::Network::BASE_SEPOLIA,
  contract_address: asset.address_id,
  method: 'balanceOf',
  args: { account: "alexstone.base.eth"},
)
```



#### Qualified Impact
<!-- Please evaluate what components could be affected and what the
impact would be if there was an
error. How would this error be resolved, e.g. rollback a deploy, push a
new fix, disable a feature
flag, etc... -->
### What changed? Why?

This adds support for funding wallets for a given Crypto Asset and
amount, using your Coinbase accounts as the source of funds to buy the
asset.

Note:: This is an Alpha feature and you must reach out on the CDP SDK
Discord to opt in.

This enables quoting a fund operation 

#### Creating a fund quote and then executing it:

```
wallet = Coinbase::Wallet.create(network: Coinbase::Network::BASE_MAINNET)

# Generate a quote
quote = wallet.quote_fund(12, :usdc)

# Inspect quote.buy_fee (fiat) and quote.transfer_fee (crypto)
puts quote

# Execute the fund operation
op = quote.execute!

# Wait for the fund operation to complete. This could take a while since this involves off-chain + on-chain interactions.
op.wait!
```

#### Fund a wallet

```
wallet = Coinbase::Wallet.create(network: Coinbase::Network::BASE_MAINNET)

# Generate a fund operation
op = wallet.fund(12, :usdc)

# Wait for the fund operation to complete. This could take a while since this involves off-chain + on-chain interactions.
op.wait!
```

#### Qualified Impact
<!-- Please evaluate what components could be affected and what the
impact would be if there was an
error. How would this error be resolved, e.g. rollback a deploy, push a
new fix, disable a feature
flag, etc... -->
### What changed? Why?

This bumps the version and updates the Changelog

#### Qualified Impact
<!-- Please evaluate what components could be affected and what the
impact would be if there was an
error. How would this error be resolved, e.g. rollback a deploy, push a
new fix, disable a feature
flag, etc... -->
@cb-heimdall
Copy link

cb-heimdall commented Nov 27, 2024

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/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

@alex-stone alex-stone merged commit 6b92ca0 into master Nov 27, 2024
10 checks passed
@alex-stone alex-stone deleted the v0.11.0 branch November 27, 2024 21:03
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.

3 participants