Skip to content

Commit f50b48a

Browse files
committed
update readme
1 parent 5d2e522 commit f50b48a

File tree

7 files changed

+18
-17
lines changed

7 files changed

+18
-17
lines changed

cex/go-example/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
const TokenContractAddress = "0x.."
1919
const WithdrawRecipientAddress = "0x.."
2020
const SponsorPolicyId = ".."
21-
const SponsorAPIEndpoint = "https://open-platform.nodereal.io/{YOUR_API_KEY}/eoa-paymaster-testnet"
21+
const SponsorAPIEndpoint = "https://open-platform.nodereal.io/{YOUR_API_KEY}/megafuel-testnet"
2222
const HotwalletPrivateKey = ".."
2323

2424
func main() {
@@ -62,7 +62,7 @@ func cexDoGaslessWithdrawl() {
6262
log.Fatalf("Failed to connect to the Ethereum network: %v", err)
6363
}
6464
// Create a PaymasterClient (for transaction sending)
65-
paymasterClient, err := NewPaymasterClient("https://bsc-paymaster-testnet.nodereal.io")
65+
paymasterClient, err := NewPaymasterClient("https://bsc-megafuel-testnet.nodereal.io")
6666
if err != nil {
6767
log.Fatalf("Failed to create PaymasterClient: %v", err)
6868
}

cex/js-example/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const hotwalletPrivateKey = 'HOT_WALLET_PRIVATE_KEY';
66
const userWithdrawAddress = 'USER_WITHDRAW_ADDRESS';
77
// ERC20 token contract address (replace with the address of the token you want to send)
88
const erc20TokenAddress = 'TOKEN_CONTRACT_ADDRESS';
9-
const sponsorEndpoint = 'https://open-platform.nodereal.io/{SPONSOR_API_KEY}/eoa-paymaster-testnet';
9+
const sponsorEndpoint = 'https://open-platform.nodereal.io/{SPONSOR_API_KEY}/megafuel-testnet';
1010
const policyID = 'SPONSOR_POLICY_ID'
1111

1212

@@ -56,7 +56,7 @@ async function cexDoGaslessWithdrawTx() {
5656
const assemblyProvider = new ethers.providers.JsonRpcProvider('https://bsc-testnet-dataseed.bnbchain.org');
5757

5858
// Provider for sending the transaction (e.g., could be a different network or provider)
59-
const paymasterProvider = new PaymasterProvider('https://bsc-paymaster-testnet.nodereal.io');
59+
const paymasterProvider = new PaymasterProvider('https://bsc-megafuel-testnet.nodereal.io');
6060

6161
const wallet = new ethers.Wallet(hotwalletPrivateKey, assemblyProvider);
6262
// ERC20 token ABI (only including the transfer function)

payment-gateway/go-example/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
const PaymentTokenContractAddress = "0x.."
1919
const PaymentRecipientAddress = "0x.."
2020
const PaymentSponsorPolicyId = ".."
21-
const SponsorAPIEndpoint = "https://open-platform.nodereal.io/{Your_API_key}/eoa-paymaster-testnet"
21+
const SponsorAPIEndpoint = "https://open-platform.nodereal.io/{Your_API_key}/megafuel-testnet"
2222
const UserPrivateKey = "..."
2323

2424
func main() {
@@ -93,7 +93,7 @@ func userDoGaslessPayment(receiver common.Address, amount *big.Int) {
9393
log.Fatalf("Failed to connect to the Ethereum network: %v", err)
9494
}
9595
// Create a PaymasterClient (for transaction sending)
96-
paymasterClient, err := NewPaymasterClient("https://bsc-paymaster-testnet.nodereal.io")
96+
paymasterClient, err := NewPaymasterClient("https://bsc-megafuel-testnet.nodereal.io")
9797
if err != nil {
9898
log.Fatalf("Failed to create PaymasterClient: %v", err)
9999
}

payment-gateway/js-example/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const userPrivateKey = 'USER_PRIVATE_KEY';
66
const paymentReceiverAddress = 'PAYMENT_RECIPIENT_ADDRESS';
77
// ERC20 token contract address (replace with the address of the token you want to send)
88
const erc20TokenAddress = 'TOKEN_CONTRACT_ADDRESS';
9-
const sponsorEndpoint = 'https://open-platform.nodereal.io/{SPONSOR_API_KEY}/eoa-paymaster-testnet';
9+
const sponsorEndpoint = 'https://open-platform.nodereal.io/{SPONSOR_API_KEY}/megafuel-testnet';
1010
const policyID = 'SPONSOR_POLICY_ID'
1111

1212

@@ -56,7 +56,7 @@ async function userDoGaslessPayment() {
5656
const assemblyProvider = new ethers.providers.JsonRpcProvider('https://bsc-testnet-dataseed.bnbchain.org');
5757

5858
// Provider for sending the transaction (e.g., could be a different network or provider)
59-
const paymasterProvider = new PaymasterProvider('https://bsc-paymaster-testnet.nodereal.io');
59+
const paymasterProvider = new PaymasterProvider('https://bsc-megafuel-testnet.nodereal.io');
6060

6161
const wallet = new ethers.Wallet(userPrivateKey, assemblyProvider);
6262
// ERC20 token ABI (only including the transfer function)

readme.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Paymaster Example
1+
# Megafuel client Example
22

3-
This repository hosts a collection of examples implemented in both Golang and JavaScript for the [Meganode Paymaster](https://docs.nodereal.io/docs/meganode-paymaster-overview).
3+
This repository hosts a collection of examples implemented in both Golang and JavaScript for the [Megafuel Paymaster](https://docs.nodereal.io/docs/megafuel-overview).
44
The client implementation follows the API standards of [BEP-414](https://github.com/bnb-chain/BEPs/blob/master/BEPs/BEP-414.md).
55
The examples include:
66

@@ -10,7 +10,7 @@ The examples include:
1010

1111

1212
## Network Endpoint
13-
BSC testnet: https://bsc-paymaster-testnet.nodereal.io
13+
BSC testnet: https://bsc-megafuel-testnet.nodereal.io
1414

1515
## Quick Start
1616

@@ -24,8 +24,9 @@ Please get ERC20 token for test before you start:
2424
- [For payment gateway integration](./payment-gateway/readme.md)
2525
- [For Cex integration](./cex/readme.md)
2626

27-
## More Docs about the Meganode Paymaster
28-
- [Paymaster Overview](https://docs.nodereal.io/docs/maganode-paymaster-overview)
29-
- [Sponsor Policy Management](https://docs.nodereal.io/docs/meganode-paymaster-policy-management)
27+
## More Docs about the Megafuel Paymaster
28+
- [Paymaster Overview](https://docs.nodereal.io/docs/megafuel-overview)
29+
- [Sponsor Policy Management](https://docs.nodereal.io/docs/megafuel-policy-management)
30+
- [Sponsor Guidelines](https://docs.nodereal.io/docs/megafuel-sponsor-guidelines)
3031
- [Wallet Integration Guide](https://docs.nodereal.io/docs/wallet-integration)
31-
- [Paymaster API Spec](https://docs.nodereal.io/docs/meganode-paymaster-api)
32+
- [Paymaster API Spec](https://docs.nodereal.io/docs/megafuel-api)

wallet-user/go-example/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func main() {
8585
log.Fatalf("Failed to connect to the Ethereum network: %v", err)
8686
}
8787
// Create a PaymasterClient (for transaction sending)
88-
paymasterClient, err := NewPaymasterClient("https://bsc-paymaster-testnet.nodereal.io")
88+
paymasterClient, err := NewPaymasterClient("https://bsc-megafuel-testnet.nodereal.io")
8989
if err != nil {
9090
log.Fatalf("Failed to create PaymasterClient: %v", err)
9191
}

wallet-user/js-example/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ async function sendERC20Transaction() {
3333
const assemblyProvider = new ethers.providers.JsonRpcProvider('https://bsc-testnet-dataseed.bnbchain.org');
3434

3535
// Provider for sending the transaction (e.g., could be a different network or provider)
36-
const paymasterProvider = new PaymasterProvider('https://bsc-paymaster-testnet.nodereal.io');
36+
const paymasterProvider = new PaymasterProvider('https://bsc-megafuel-testnet.nodereal.io');
3737

3838
const wallet = new ethers.Wallet(privateKey, assemblyProvider);
3939
// ERC20 token ABI (only including the transfer function)

0 commit comments

Comments
 (0)