Mint a NFT in SAP ABAP!
This ABAP code example demonstrates how to mint an ERC721 NFT on a given Ethereum compatible blockchain.
- Clone provide-abap to your SAP system
- Activate the provide-abap SICF node
- In transaction code STRUST, configure the SSL certificates needed for Provide stack (see certificates directory of the provide-abap repo)
- Create an account at https://shuttle.provide.services. Create organization at minimum (workgroup creation is recommended but optional)
- Import the provided Postman collection.
- Maintain the shuttle_email and shuttle_password collection variables accordingly
- Maintain SAP user id and password in the Postman collection
- Enter the web dispatcher base url (ex: fiorilaunchpad.mycompany.com) to the sapbaseurl collection variable
- Run the HTTP requests in the following order:
- Get access token with login
- List organizations
- Generate long-dated refresh token
- Get access token from refresh token
- Create account (Do both Polygon Mumbai and Celo Alfajores)
- List accounts (take note of the address field for later!)
- SAP / provide-abap fetch token
- SAP / provide-abap tenants create
Steps 7 an 8 populate your Provide credentials to the SAP system.
For these self-custody transactions, you'll need some gas tokens to complete the NFT mint transaction. Use the wallet addresses you noted earlier to request gas from the given network testnet faucet.
Polygon Mumbai : https://faucet.polygon.technology
Celo Alfajores : https://faucet.celo.org/alfajores
- Upload the json files in the abi directory of this repo to a directory in AL11
- Maintain the following entries in the zprvdabiregistry table. This can be done via execution of the class method zcl_prvd_file_helper=>update_abi_registry (be sure to check case sensitive)
- Open the report ZPRVD_NFT_MINT_EXAMPLE
- Run with either the following sets of parameters
- Polygon Mumbai
- Network ID : 4251b6fd-c98d-4017-87a3-d691a77a52a7
- Contract name : CarbonEmissionsNFT
- Contract address : 0x4e9915B2ff6679C63a290645B589794d89584E5C
- Celo Alfajores
- Network ID : d818afb9-df2f-4e46-963a-f7b6cb7655d2
- Contract name : ProvideTest
- Contract address : 0x7e7c0EB2074f499f9010Ad3b7c6a20EdF9E3346c
After successfully running the NFT mint - check out the smart contract activity on th block explorers of the given network Polygon Mumbai: https://mumbai.polygonscan.com/address/0x4e9915b2ff6679c63a290645b589794d89584e5c Celo Alfajores: https://alfajores.celoscan.io/address/0x7e7c0eb2074f499f9010ad3b7c6a20edf9e3346c
For comparison sake - check out this repo to see a similar integration in Javascript/Typescript to mint NFTs using the provide-js library
Huge thanks to Nuve! Highly recommended to take your ABAP development to a whole new level of sophistication with abapGit, CI/CD, system versioning and more :)