Updates API to new changes
laisolizq laisolizq@gmail.com
Fri, 04 Dec 2020 11:09:59 +0100
5 files changed,
20 insertions(+),
23 deletions(-)
M
api/api_test.go
→
api/api_test.go
@@ -369,6 +369,7 @@ DefaultSlotSetBid: defaultSlotSetBid,
Outbidding: uint16(1), SlotDeadline: uint8(20), BootCoordinator: ethCommon.HexToAddress("0x1111111111111111111111111111111111111111"), + BootCoordinatorURL: "https://boot.coordinator.io", ClosedAuctionSlots: uint16(2), OpenAuctionSlots: uint16(5), }
M
api/swagger.yml
→
api/swagger.yml
@@ -2697,6 +2697,10 @@ allOf:
- $ref: '#/components/schemas/EthereumAddress' - description: Ethereum address of the boot coordinator. - example: "0x997dc4262BCDbf85190C01c996b4C06a461d2430" + bootCoordinatorUrl: + type: string + description: Boot Coordinator URL + example: "https://boot.coordinator.io" slotDeadline: type: integer description: Number of blocks after the beginning of a slot after which any coordinator can forge if the winner has not forged any batch in that slot.@@ -2733,6 +2737,7 @@ additionalProperties: false
required: - ethereumBlockNum - bootCoordinator + - bootCoordinatorUrl - slotDeadline - closedAuctionSlots - openAuctionSlots@@ -2804,20 +2809,15 @@ description: Withdrawal delayer parameters
properties: ethereumBlockNum: $ref: '#/components/schemas/EthBlockNum' - hermezGovernanceDAOAddress: + hermezGovernanceAddress: allOf: - $ref: '#/components/schemas/EthereumAddress' - - description: Ethereum address of the governance DAO. + - description: Ethereum address of the governance. - example: "0x667dc4262BCDbf85190C01c996b4C06a461d2430" - whiteHackGroupAddress: + emergencyCouncilAddress: allOf: - $ref: '#/components/schemas/EthereumAddress' - description: Ethereum Address that can claim the funds in an emergency when the maximum emergency mode time is exceeded. - - example: "0x557dc4262BCDbf85190C01c996b4C06a461d2430" - hermezKeeperAddress: - allOf: - - $ref: '#/components/schemas/EthereumAddress' - - description: Ethereum Address that can enable emergency mode and modify the delay to make a withdrawal. - example: "0x557dc4262BCDbf85190C01c996b4C06a461d2430" withdrawalDelay: allOf:@@ -2835,9 +2835,8 @@ example: false
additionalProperties: false required: - ethereumBlockNum - - hermezGovernanceDAOAddress - - whiteHackGroupAddress - - hermezKeeperAddress + - hermezGovernanceAddress + - emergencyCouncilAddress - withdrawalDelay - emergencyModeStartingTime - emergencyMode@@ -2925,16 +2924,11 @@ allOf:
- $ref: '#/components/schemas/EthereumAddress' - description: Ethereum address of the auction smart contract. - example: "0x111dc4262BCDbf85190C01c996b4C06a461d2430" - hermezGovernanceDAOAddress: + hermezGovernanceAddress: allOf: - $ref: '#/components/schemas/EthereumAddress' - - description: Ethereum address of the governanceDAO. + - description: Ethereum address of the governance. - example: "0x222dc4262BCDbf85190C01c996b4C06a461d2430" - safetyAddress: - allOf: - - $ref: '#/components/schemas/EthereumAddress' - - description: Ethereum address of the safety. - - example: "0x333dc4262BCDbf85190C01c996b4C06a461d2430" withdrawDelayerContract: allOf: - $ref: '#/components/schemas/EthereumAddress'@@ -2945,8 +2939,7 @@ - tokenHEZ
- absoluteMaxL1L2BatchTimeout - verifiers - hermezAuctionContract - - hermezGovernanceDAOAddress - - safetyAddress + - hermezGovernanceAddress - withdrawDelayerContract additionalProperties: false maxFeeIdxCoordinator:
M
common/ethauction.go
→
common/ethauction.go
@@ -25,7 +25,6 @@ TokenHEZ ethCommon.Address `json:"tokenHEZ"`
// HermezRollup smartcontract address HermezRollup ethCommon.Address `json:"hermezRollup"` // Hermez Governanze Token smartcontract address who controls some parameters and collects HEZ fee - // Only for test GovernanceAddress ethCommon.Address `json:"governanceAddress"` }@@ -54,7 +53,7 @@
// AuctionVariables are the variables of the Auction Smart Contract type AuctionVariables struct { EthBlockNum int64 `json:"ethereumBlockNum" meddler:"eth_block_num"` - // Boot Coordinator Address + // Donation Address DonationAddress ethCommon.Address `json:"donationAddress" meddler:"donation_address" validate:"required"` // Boot Coordinator Address BootCoordinator ethCommon.Address `json:"bootCoordinator" meddler:"boot_coordinator" validate:"required"`
M
db/migrations/0001.sql
→
db/migrations/0001.sql
@@ -12,7 +12,7 @@ item_id SERIAL PRIMARY KEY,
bidder_addr BYTEA NOT NULL, forger_addr BYTEA NOT NULL, eth_block_num BIGINT NOT NULL REFERENCES block (eth_block_num) ON DELETE CASCADE, - url VARCHAR(200) NOT NULL + url BYTEA NOT NULL ); CREATE TABLE batch (
M
eth/auction.go
→
eth/auction.go
@@ -669,6 +669,10 @@ if err != nil {
return tracerr.Wrap(err) } auctionVariables.BootCoordinator = *bootCoordinator + auctionVariables.BootCoordinatorURL, err = c.auction.BootCoordinatorURL(nil) + if err != nil { + return tracerr.Wrap(err) + } auctionVariables.ClosedAuctionSlots, err = c.AuctionGetClosedAuctionSlots() if err != nil { return tracerr.Wrap(err)