Python SDK for ApePay
Reason this release was yanked:
manifest installed in wrong location
Project description
ApePay
A smart contract payment system built for automated service management
About
See the blog post to learn more about ApePay!
Documentation
Coming soon!
Contributing
ApePay is open source and we welcome all contributors! Check out the following to get started.
TODOs:
- Initial implementation
- Documentation
- Live testing on Sepolia
- Production deployment on Arbitrum
- Frontend management console, for managing subscriptions
Setup (Python)
First, install Ape
Second, make sure to install the plugins:
$ ape plugins install . --upgrade
Next, prior to installing the SDK package, you have to compile the project:
$ ape compile
The SDK package relies on a soft link in [`./sdk/py/apepay/manifest.json`](./sdk/py/apepay/manifest.json)
Lastly, install the SDK package via:
$ poetry install
Then you are ready to contribute!
Setup (JS)
In order to contribute to the JS SDK and React component library, or to build the demo app, you need to first follow the Python Setup instructions to compile the smart contract package.
Next, you need install the node packages for development:
$ npm install
In order to work on the React component library, you need to compile the JS SDK:
$ npm run build --workspace=sdk/js
In order to work on the Demo app, you need to compile the JS SDK (like above) as well as compile the React component library:
$ npm run build --workspace=ui/lib
Then you are ready to contribute!
To run the demo app in development mode, do the following:
$ npm run dev --workspace=ui/app
To build the demo app for production, do the following:
$ npm run build --workspace=ui/app
Testing
To run tests, just use Ape:
$ ape test
To see gas usage, add the --gas
flag:
$ ape test --gas
Scripts
To deploy a StreamManager (for testing purposes), run:
$ ape run deploy manager [TOKEN_ADDRESS [...]]
# Or if `ape tokens` is installed with a valid tokenlist
$ ape run deploy manager [TOKEN_SYMBOL [...]]
To deploy the StreamFactory (for production use), run:
$ ape run deploy factory
To run the demo ApePay cluster daemon, first run a node like anvil
:
$ anvil --derivation-path "m/44'/60'/0'/" --block-time 1 --prune-history
NOTE: the --derivation-path
flag makes ape's test accounts match anvil's
Then run the daemon:
$ silverback run scripts.daemon:app --network ::foundry --account TEST::0
After that, it's suggested to start ape console
and create a stream to watch the daemon react
License
ApePay is licensed Apache 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file apepay-0.2.0.tar.gz
.
File metadata
- Download URL: apepay-0.2.0.tar.gz
- Upload date:
- Size: 49.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.11 Linux/6.2.0-32-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc8ce8622e472bf2f45b0cd1c003cfdcc0b56ff96fcab332c0196ff92b89e125 |
|
MD5 | c24a76eb41247c15b83003249cc50664 |
|
BLAKE2b-256 | df6b93b3b44315fd81d20681f30dbfb50a27d6488c941d9e29def240fd9b45e7 |
File details
Details for the file apepay-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: apepay-0.2.0-py3-none-any.whl
- Upload date:
- Size: 51.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.11 Linux/6.2.0-32-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4a5bcd3d4a6a3d23d1b08317ef87e7aa6d8f687ee98f382e635830d1684a975 |
|
MD5 | 6ae17138c9aed27a76010755e149267d |
|
BLAKE2b-256 | 7438f0c3333e0ccfd156a3ece3508c680eb43ba405adc8c74289615d8ddc71bb |