# Suggested GSN configuration
We have 3 different things we can "wrap" (or "gsn-enable"):
```javascript
wrapContract( contract, gsnConfig)
wrapSigner( provider, gsnConfig)
// RelayProvider.newProvider()
wrapRpcProvider(web3Provider, gsnConfig)
```
We need to allow all of them to support configuring with paymaster.
**gsnConfig** type should be `Partial<GsnConfig> | ()=>Partial<GsnConfig> | ()=>Promise<Partial<GsnConfig>>`
(that is, the parameter is either actual configuration, as it is today, or a function returning the configuration
needed GSN changes:
- move "**dependencyOverrides**" into "config"
- add "**asyncInit(provider,config)**" dependency. this allows dynamically customize the configuration (like, paymaster address) from the network
- this method is called as first call in init() before resolving.
- the only field it can't customize is the asyncInit itself...
e.g.
hypothetical configuration for a **VerifyingPaymaster**.
- read from the network a json file with (paymaster,url) for each chain
- contact the url with the RelayRequest to fill paymasterData
- use with: `wrapContract(contact, GsnVerifyServer())`
```javascript
function GsnVerifyServer(debug=false) {
debuglog = debug ? console.debug: ()=>{}
return {
dependencies: {
asyncInit: async (provider, config) => {
net = await provider.getNetwork()
resp = await axios.get(verifyConfigUrl)
debuglog('net',net, 'config=', resp.data)
const netconfig = resp.data.json[net.chainId]
config.paymasterAddress = netconfig.paymaster
config.dependencies.asyncPaymasterData =
(req) => {
debuglog('get paymasterdata')
return axios.get(netconfig.url, {req})
}
return config
}
}
}
}
```
Actually, we can add a "**GsnTestNetwork**" config, which will automatically add an "AcceptEverythingPaymaster" for the current testnet (or throw an error on mainnet)