我正在开发一个web应用程序(前端和后端),它通过1英寸的API执行交换。
在执行事务时,它看起来使用的是遗留气体。不过,我想用EIP-1559气体代替.有可能吗?有人能帮我吗?
我正在使用这里描述的交换调用:https://docs.1inch.io/docs/aggregation-protocol/api/swagger
发布于 2022-11-21 16:27:37
开发人员需要编辑API返回的事务对象,以包含参数maxPriorityFeePerGas和maxFeePerGas,并从对象中删除gasPrice键。
所以与其拥有
"tx": {
"from": "string",
"to": "string",
"data": "string",
"value": "string",
"gasPrice": "string",
"gas": "string"
}你就会
"tx": {
"from": "string",
"to": "string",
"data": "string",
"value": "string",
"gas": "string",
"maxPriorityFeePerGas": "string",
"maxFeePerGas": "string",
}发送EIP-1559事务的示例可以是在这里发现的。
https://ethereum.stackexchange.com/questions/125757
复制相似问题