Skip to content

Commit

Permalink
feat(twap): update contract addresses (#3031)
Browse files Browse the repository at this point in the history
* feat(twap): update contract addresses

* test: update unittests with new addresses

* fix: fix update TWAP contract to the right one

---------

Co-authored-by: Anxo Rodriguez <[email protected]>
  • Loading branch information
alfetopito and anxolin authored Aug 11, 2023
1 parent b7a2c2b commit 6306bd2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions src/modules/advancedOrders/const.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { SupportedChainId } from '@cowprotocol/cow-sdk'

const composableCowAddress = '0xF487887DA5a4b4e3eC114FDAd97dc0F785d72738'
const composableCowAddress = '0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74'
export const COMPOSABLE_COW_ADDRESS: Record<SupportedChainId, string> = {
1: composableCowAddress,
100: composableCowAddress,
5: composableCowAddress,
}

const extensibleHandlerAddress = '0x4e305935b14627eA57CBDbCfF57e81fd9F240403'
const extensibleHandlerAddress = '0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5'
export const SAFE_EXTENSIBLE_HANDLER_ADDRESS: Record<SupportedChainId, string> = {
1: extensibleHandlerAddress,
100: extensibleHandlerAddress,
5: extensibleHandlerAddress,
}

const currentBlockFactoryAddress = '0x0899c7DC280363d263Cc954506134F249CceC4a5'
const currentBlockFactoryAddress = '0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc'
export const CURRENT_BLOCK_FACTORY_ADDRESS: Record<SupportedChainId, string> = {
1: currentBlockFactoryAddress,
100: currentBlockFactoryAddress,
Expand Down
2 changes: 1 addition & 1 deletion src/modules/twap/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const ORDER_DEADLINES: OrderDeadline[] = [
export const TWAP_ORDER_STRUCT =
'tuple(address sellToken,address buyToken,address receiver,uint256 partSellAmount,uint256 minPartLimit,uint256 t0,uint256 n,uint256 t,uint256 span,bytes32 appData)'

const twapHandlerAddress = '0x910d00a310f7Dc5B29FE73458F47f519be547D3d'
const twapHandlerAddress = '0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5'
export const TWAP_HANDLER_ADDRESS: Record<SupportedChainId, string> = {
1: twapHandlerAddress,
100: twapHandlerAddress,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Array [
"createWithContext",
Array [
Object {
"handler": "0x910d00a310f7Dc5B29FE73458F47f519be547D3d",
"handler": "0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5",
"salt": "0x00000000000000000000000000000000000000000000000000000015c90b9b2a",
"staticInput": "0x00000000000000000000000091056d4a53e1faa1a84306d4deaec71085394bc8000000000000000000000000b4fbf271143f4fbf7b91a5ded31805e42b2208d6000000000000000000000000b4fbf271143f4fbf7b91a5ded31805e42b2208d600000000000000000000000000000000000000000000000000000007c2d24d55000000000000000000000000000000000000000000000000000000000001046a00000000000000000000000000000000000000000000000000000000646b782c000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000002580000000000000000000000000000000000000000000000000000000000000000bace6e636671f2df6e59ef1eb4e63dce6b646a70c51b004ae5a07a9fbe4356fc",
},
"0x0899c7DC280363d263Cc954506134F249CceC4a5",
"0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc",
"0x",
true,
],
Expand Down Expand Up @@ -53,7 +53,7 @@ Array [
Object {
"data": "0xCREATE_COW_TX_DATA",
"operation": 0,
"to": "0xF487887DA5a4b4e3eC114FDAd97dc0F785d72738",
"to": "0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74",
"value": "0",
},
]
Expand All @@ -64,11 +64,11 @@ Array [
"createWithContext",
Array [
Object {
"handler": "0x910d00a310f7Dc5B29FE73458F47f519be547D3d",
"handler": "0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5",
"salt": "0x00000000000000000000000000000000000000000000000000000015c90b9b2a",
"staticInput": "0x00000000000000000000000091056d4a53e1faa1a84306d4deaec71085394bc8000000000000000000000000b4fbf271143f4fbf7b91a5ded31805e42b2208d6000000000000000000000000b4fbf271143f4fbf7b91a5ded31805e42b2208d600000000000000000000000000000000000000000000000000000007c2d24d55000000000000000000000000000000000000000000000000000000000001046a00000000000000000000000000000000000000000000000000000000646b782c000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000002580000000000000000000000000000000000000000000000000000000000000000bace6e636671f2df6e59ef1eb4e63dce6b646a70c51b004ae5a07a9fbe4356fc",
},
"0x0899c7DC280363d263Cc954506134F249CceC4a5",
"0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc",
"0x",
true,
],
Expand Down Expand Up @@ -96,7 +96,7 @@ Array [
Object {
"data": "0xCREATE_COW_TX_DATA",
"operation": 0,
"to": "0xF487887DA5a4b4e3eC114FDAd97dc0F785d72738",
"to": "0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74",
"value": "0",
},
]
Expand All @@ -107,11 +107,11 @@ Array [
"createWithContext",
Array [
Object {
"handler": "0x910d00a310f7Dc5B29FE73458F47f519be547D3d",
"handler": "0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5",
"salt": "0x00000000000000000000000000000000000000000000000000000015c90b9b2a",
"staticInput": "0x00000000000000000000000091056d4a53e1faa1a84306d4deaec71085394bc8000000000000000000000000b4fbf271143f4fbf7b91a5ded31805e42b2208d6000000000000000000000000b4fbf271143f4fbf7b91a5ded31805e42b2208d600000000000000000000000000000000000000000000000000000007c2d24d55000000000000000000000000000000000000000000000000000000000001046a00000000000000000000000000000000000000000000000000000000646b782c000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000002580000000000000000000000000000000000000000000000000000000000000000bace6e636671f2df6e59ef1eb4e63dce6b646a70c51b004ae5a07a9fbe4356fc",
},
"0x0899c7DC280363d263Cc954506134F249CceC4a5",
"0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc",
"0x",
true,
],
Expand All @@ -123,7 +123,7 @@ Array [
Object {
"data": "0xCREATE_COW_TX_DATA",
"operation": 0,
"to": "0xF487887DA5a4b4e3eC114FDAd97dc0F785d72738",
"to": "0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74",
"value": "0",
},
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
exports[`extensibleFallbackSetupTxs - service to generate transactions for ExtensibleFallback setup Should create a bundle of two transactions: setFallbackHandler and setDomainVerifier 1`] = `
Array [
Object {
"data": "0xf08a03230000000000000000000000004e305935b14627ea57cbdbcff57e81fd9f240403",
"data": "0xf08a03230000000000000000000000002f55e8b20d0b9fefa187aa7d00b6cbe563605bf5",
"operation": 0,
"to": "0xA12D770028d7072b80BAEb6A1df962cccfd1dddd",
"value": "0",
},
Object {
"data": "0x3365582ca5b986c2f5845d520bcb903639360b147735589732066cea24a3a59678025c94000000000000000000000000f487887da5a4b4e3ec114fdad97dc0f785d72738",
"data": "0x3365582ca5b986c2f5845d520bcb903639360b147735589732066cea24a3a59678025c94000000000000000000000000fdafc9d1902f4e0b84f65f49f244b32b31013b74",
"operation": 0,
"to": "0xA12D770028d7072b80BAEb6A1df962cccfd1dddd",
"value": "0",
Expand Down
2 changes: 1 addition & 1 deletion src/modules/twap/services/verifyExtensibleFallback.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('verifyExtensibleFallback', () => {
// domainVerifiers()
if (method === 'eth_call' && params?.[0]?.data?.startsWith('0x51cad5ee')) {
//Composable cow address
return Promise.resolve('0x000000000000000000000000F487887DA5a4b4e3eC114FDAd97dc0F785d72738')
return Promise.resolve('0x000000000000000000000000fdaFc9d1902f4e0b84f65F49f244b32b31013b74')
}

return defaultJsonRpcHandler(method)
Expand Down

0 comments on commit 6306bd2

Please sign in to comment.