Skip to content

Conversation

@CarsonRoscoe
Copy link
Contributor

(PR of #555 into main. Had to merge into staging branch first to get E2E workflows to run)

Description

Updates create_facilitator_config to support x402 python sdk v2:

Tests

Manually tested with modified v2 fastapi example by replacing:
facilitator = HTTPFacilitatorClient(FacilitatorConfig(url=FACILITATOR_URL))
with:

facilitator_config = create_facilitator_config(CDP_API_KEY_ID, CDP_API_KEY_SECRET)
facilitator = HTTPFacilitatorClient(facilitator_config)
Making request to: http://localhost:4021/weather

Response body: { report: { weather: 'sunny', temperature: 70 } }

Payment response: {
  success: true,
  payer: '0xE33A295AF5C90A0649DFBECfDf9D604789B892e2',
  transaction: '0x717dbc36b3ad908437c908ff96007073ccb54c1aaa8a270d28bca80cf5e9142b',
  network: 'eip155:8453'
}

Also tested with v1 mainnet example

Checklist

A couple of things to include in your PR for completeness:

  • Updated the typescript README if relevant
  • Updated the python README if relevant
  • Added a changelog entry
  • Added e2e tests if introducing new functionality

@cb-heimdall
Copy link

🟡 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
2 if repo is sensitive 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

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