File tree Expand file tree Collapse file tree 7 files changed +18
-17
lines changed Expand file tree Collapse file tree 7 files changed +18
-17
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import (
18
18
const TokenContractAddress = "0x.."
19
19
const WithdrawRecipientAddress = "0x.."
20
20
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"
22
22
const HotwalletPrivateKey = ".."
23
23
24
24
func main () {
@@ -62,7 +62,7 @@ func cexDoGaslessWithdrawl() {
62
62
log .Fatalf ("Failed to connect to the Ethereum network: %v" , err )
63
63
}
64
64
// 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" )
66
66
if err != nil {
67
67
log .Fatalf ("Failed to create PaymasterClient: %v" , err )
68
68
}
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ const hotwalletPrivateKey = 'HOT_WALLET_PRIVATE_KEY';
6
6
const userWithdrawAddress = 'USER_WITHDRAW_ADDRESS' ;
7
7
// ERC20 token contract address (replace with the address of the token you want to send)
8
8
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' ;
10
10
const policyID = 'SPONSOR_POLICY_ID'
11
11
12
12
@@ -56,7 +56,7 @@ async function cexDoGaslessWithdrawTx() {
56
56
const assemblyProvider = new ethers . providers . JsonRpcProvider ( 'https://bsc-testnet-dataseed.bnbchain.org' ) ;
57
57
58
58
// 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' ) ;
60
60
61
61
const wallet = new ethers . Wallet ( hotwalletPrivateKey , assemblyProvider ) ;
62
62
// ERC20 token ABI (only including the transfer function)
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import (
18
18
const PaymentTokenContractAddress = "0x.."
19
19
const PaymentRecipientAddress = "0x.."
20
20
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"
22
22
const UserPrivateKey = "..."
23
23
24
24
func main () {
@@ -93,7 +93,7 @@ func userDoGaslessPayment(receiver common.Address, amount *big.Int) {
93
93
log .Fatalf ("Failed to connect to the Ethereum network: %v" , err )
94
94
}
95
95
// 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" )
97
97
if err != nil {
98
98
log .Fatalf ("Failed to create PaymasterClient: %v" , err )
99
99
}
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ const userPrivateKey = 'USER_PRIVATE_KEY';
6
6
const paymentReceiverAddress = 'PAYMENT_RECIPIENT_ADDRESS' ;
7
7
// ERC20 token contract address (replace with the address of the token you want to send)
8
8
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' ;
10
10
const policyID = 'SPONSOR_POLICY_ID'
11
11
12
12
@@ -56,7 +56,7 @@ async function userDoGaslessPayment() {
56
56
const assemblyProvider = new ethers . providers . JsonRpcProvider ( 'https://bsc-testnet-dataseed.bnbchain.org' ) ;
57
57
58
58
// 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' ) ;
60
60
61
61
const wallet = new ethers . Wallet ( userPrivateKey , assemblyProvider ) ;
62
62
// ERC20 token ABI (only including the transfer function)
Original file line number Diff line number Diff line change 1
- # Paymaster Example
1
+ # Megafuel client Example
2
2
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 ) .
4
4
The client implementation follows the API standards of [ BEP-414] ( https://github.com/bnb-chain/BEPs/blob/master/BEPs/BEP-414.md ) .
5
5
The examples include:
6
6
@@ -10,7 +10,7 @@ The examples include:
10
10
11
11
12
12
## Network Endpoint
13
- BSC testnet: https://bsc-paymaster -testnet.nodereal.io
13
+ BSC testnet: https://bsc-megafuel -testnet.nodereal.io
14
14
15
15
## Quick Start
16
16
@@ -24,8 +24,9 @@ Please get ERC20 token for test before you start:
24
24
- [ For payment gateway integration] ( ./payment-gateway/readme.md )
25
25
- [ For Cex integration] ( ./cex/readme.md )
26
26
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 )
30
31
- [ 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 )
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ func main() {
85
85
log .Fatalf ("Failed to connect to the Ethereum network: %v" , err )
86
86
}
87
87
// 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" )
89
89
if err != nil {
90
90
log .Fatalf ("Failed to create PaymasterClient: %v" , err )
91
91
}
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ async function sendERC20Transaction() {
33
33
const assemblyProvider = new ethers . providers . JsonRpcProvider ( 'https://bsc-testnet-dataseed.bnbchain.org' ) ;
34
34
35
35
// 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' ) ;
37
37
38
38
const wallet = new ethers . Wallet ( privateKey , assemblyProvider ) ;
39
39
// ERC20 token ABI (only including the transfer function)
You can’t perform that action at this time.
0 commit comments